Skip to content

sgkens/commitfusion

Repository files navigation

CommitFusion

CommitFusion is a PowerShell module designed to streamline the process of generating Conventional Commits Messages in git. Commit messages are constructed using the 🧷Conventional Commits specification standard, and uses 🧷gitmojis Schema see 🧷gitmoji.dev, The module allows the construction of a custimized commit message with a number of options.

📒 Documentaiton

🚀 Module Features

🪶 Conventional Commits Standard - Streamlined commit messages for better collaboration.
🪶 Customizable Commit Message - Tailor your messages to fit your project's unique needs.
🪶 Semver Versioning Generator - Automate versioning with semantic versioning for clear releases.
🪶 Changelog Auto-update with Markdown Auto-format - Maintain an organized and formatted changelog.
🪶 Gitmoji Custom Schema - Add a touch of personality with custom Gitmoji schemes.

🎾 Using Commitfusion

Retrive list of available commit types

Get-CommitTypes

Retrive list of available commit types.

Get-CommitTypes -Semver patch
Get-CommitTypes -Semver minor
Get-CommitTypes -Semver major
Get-CommitTypes -Semver nosemver

Creating a new feature commit.

# Default Returns ]string]
New-Commit -Type feat -Body "Updated module logic", "updated readme" -FeatureAddtions "Provided new module gunctionally via new cmdlet"

Assuming you have staged files, you can use the following to commit the changes:

# Apply Commit
New-Commit @params | Set-Commit -Confirm
# Apply Commit and write to changelog file 
New-Commit @params | Format-FusionMD | Update-Changelog -logfile path\to\file | Set-Commit -Confirm

Generate Semver version base on you commits

# generate SemVer Version returns psobject
Get-GitAutoVersion | select version
# only string
(Get-GitAutoVersion).Version
# in string
$version = "v_$((Get-GitAutoVersion).Version)"

Default avaliable commit types

Types are found at`$moduleroot/libs/commitfusion.types.json