-
Notifications
You must be signed in to change notification settings - Fork 653
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] merge-message-formats gets overwritten #2371
Comments
Possible fix: |
Since you have a possible fix in place, do you think you could submit that change as a pull request, @chrisism? |
Of course, here we go. #2376 |
Closed by #2376 |
🎉 This issue has been resolved in version 5.5.0 🎉 Your GitReleaseManager bot 📦🚀 |
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.
The text was updated successfully, but these errors were encountered: