Generates a markdown changelog from Git commit messages between the latest and previous tags.
Get-MFGitChangeLog [-ChangeLogTypes <Hashtable>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
Get-MFGitChangeLog [-ChangeLogTypes <Hashtable>] [-FromLastTag] [-ProgressAction <ActionPreference>]
[<CommonParameters>]
Get-MFGitChangeLog [-ChangeLogTypes <Hashtable>] [-All] [-ProgressAction <ActionPreference>]
[<CommonParameters>]
This function retrieves Git commit messages between the latest and previous tags, categorizes them based on predefined types, and formats them into a markdown changelog. It ensures the Git environment is correctly set up and handles errors if Git is not recognized or tags are not found.
Get-MFGitChangeLog
DESCRIPTION Call the `Get-MFGitChangeLog` function with default change Log Types. The function will generate a markdown changelog that can be sent to release or artifact notes.
Version: v1.0.0 –> v1.1.0
Get-MFGitChangeLog -ChangeLogTypes @{
'feat' = 'New Features'
'fix' = 'Bug Fixes'
'chore' = 'Chore and Pipeline work'
'test' = 'Test Changes'
}
DESCRIPTION This example demonstrates how to call the `Get-MFGitChangeLog` function with a custom set of changelog types, in case you want to control your own
Version: v1.0.0 –> v1.1.0
Get-MFGitChangeLog -All
DESCRIPTION Generates a full markdown changelog with all versions.
get-mfGitChangeLog -fromLastTag
DESCRIPTION Generates markdown changelog from commit messages from the last tag until now (Head)
Change Logs Types and corresponding Heading. Hashtable/Key Value Pair expected. Key = git type; Value = Heading ‘chore’ = ‘Chore and Pipeline work’ ‘test’ = ‘Testing’
Type: Hashtable
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: @{
'feat' = 'New Features'
'fix' = 'Bug Fixes'
'docs' = 'Documentation Changes'
'refactor' = 'Code Rewrite/Refactor'
'perf' = 'Performance Improvements'
#'chore' = 'Chore and Pipeline work'
#'test' = 'Testing'
}
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
Switch to get a full changelog for ALL tags
Type: SwitchParameter
Parameter Sets: All
Aliases:
Required: True
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
Switch to get the changelog from the last tag until this point.
Type: SwitchParameter
Parameter Sets: FromLastTag
Aliases:
Required: True
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Author: Adrian Andersson