Skip to content

Added simple fix for mergemessageformats override #2376

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

Merged

Conversation

chrisism
Copy link

@chrisism chrisism commented Aug 3, 2020

Fixes #2371. 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

Description

Quick fix in ConfigurationBuilder by instead of checking only for the MergeMessageFormats to be null, actually checking if it has any values.
Proper resolution still needed, because this will not actually merge the two dictionaries.

Related Issue

Issue #2371

Motivation and Context

See the issue for more details. This will now solve the situation that custom formats are not applied.

How Has This Been Tested?

Ran all the unittests, using it in own build server environment.

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Copy link
Member

@asbjornu asbjornu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@asbjornu asbjornu merged commit 8dcc088 into GitTools:master Aug 4, 2020
@asbjornu
Copy link
Member

asbjornu commented Aug 4, 2020

Thank you for your contributions, @chrisism. 🙏

@asbjornu asbjornu added this to the 5.5.0 milestone Aug 4, 2020
@arturcic arturcic removed this from the 5.5.0 milestone Oct 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] merge-message-formats gets overwritten
3 participants