-
Notifications
You must be signed in to change notification settings - Fork 654
Merge message parser does not work for merge commits created by TFS #1628
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
Comments
This issue has been automatically marked as stale because it has not had recent activity. After 30 days from now, it will be closed if no further activity occurs. Thank you for your contributions. |
Any thoughts on this? This issue prevents us from using the latest GitVersion, since we cannot control the merge commit message created by TFS. |
This issue has been automatically marked as stale because it has not had recent activity. After 30 days from now, it will be closed if no further activity occurs. Thank you for your contributions. |
Still hoping for a fix on this |
I'd think #1488 should help fix this issue for you. Have you looked into configuring |
Thanks @asbjornu! I will test it out. |
This issue has been automatically marked as stale because it has not had recent activity. After 30 days from now, it will be closed if no further activity occurs. Thank you for your contributions. |
The documentation for |
@asbjornu Thanks - I tried it exactly from the documentation, and it didn't work. I eventually got it working after adding quotes around the regex. This failed due to an error parsing the YAML:
This worked:
|
The original issue seems to be resolved however, thank you for the help. One other question if you don't mind - we are having issues where users creating the pull request from the release branch to master don't use the exact right syntax (e.g. 'merge release 1.0.0 into master' instead of 'merge release/1.0.0 to master'). And TFS has unfortunately removed the auto-complete of the merge message title. Is there any setting or suggestion to designate the commit created by the merge from the release branch into master as the version specified by the release branch name? |
@kelly987654, yes – YAML requires strings to be wrapped in quotation marks. The release branch name should affect the version number, as long as it's identified as a release branch by GitVersion. How do you name your release branches? If you use |
@asbjornu : Thank you! Our workflow is as follows:
I tried with GitVersion 5.1.2, as well as the much older version (3.6.5), and it seems that GitVersion only uses the merge message to detect if the release branch was merged into master, and if the merge message isn't formatted correctly, it will default to the branch's default increment (Patch). Are we missing some other step or configuration that would allow us to be more flexible with the exact merge commit message? We can add some more regex options in the merge-message-formats configuration, but I was hoping it was possible that GitVersion could just tell that the release branch was merged into master without relying on the merge message. |
You might be right. I don't remember exactly how the release detection is performed. |
Okay thanks - we will look into using a hook to enforce a well formatted merge message. I just wanted to make sure we weren't missing a simple setting. |
Uh oh!
There was an error while loading. Please reload this page.
TFS automatically prepends the PR# to the merge commit message, which prevents the Regex matches of merge commit messages to properly detect the base version.
For ex. if the PR title is 'Merge release/2.3.1 to master', the merge commit automatically created by TFS on completion of the PR is 'Merged PR 12345: Merge release/2.3.1 to master'
Expected version: 2.3.1+0
Actual version: 2.3.1+688
Removing the '^' at the beginning of the Regex expressions in MergeMessage.cs would fix the issue.
This issue appeared after updating to GitVersion 4, we did not have this issue in version 3.
The text was updated successfully, but these errors were encountered: