-
Notifications
You must be signed in to change notification settings - Fork 664
Description
Describe the bug
When you set your own custom merge-message-formats it will get overwritten when applying gitversion.
Running the gitversion /showConfig will just show a emtpy dictionary again :
commit-date-format: yyyy-MM-dd merge-message-formats: {} update-build-number: true
Expected Behavior
When I insert a custom merge-message-format I expect it to end up in the combined config and applied during gitversion action.
Actual Behavior
merge-message-formats stays { }
Possible Fix
The default Config() that is used as override in ConfigProvider has by default an empty dictionary for mergemessageformats, which will then override the custom dictionary because it only checks for NULL value. Merge dictionaries instead of override.
Steps to Reproduce
Alter gitversion.yml with:
merge-message-formats: tfs:'^Merged (?:PR (?<PullRequestNumber>\d+)): (M|m)erge (?<SourceBranch>.+) (in)?to (?<TargetBranch>.+)'
execute: gitversion /showConfig
Result:
ignore: sha: [] commit-date-format: yyyy-MM-dd merge-message-formats: {} update-build-number: true
Context
Now I can only use tags for incrementing. All my build pipelines in azure devops are now getting incorrect versions.
Your Environment
Azure devops, using latest gittools task as.