-
Notifications
You must be signed in to change notification settings - Fork 651
Stash branch & pull requests merges are not properly parsed when branch name contains a JIRA key #321
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
Currently testing the following change in MergeMessageParser.cs:
|
What version are you using. The pull request merged about an hour ago into master fixes this issue (if you were using master) |
Yes, I noticed. I was working the last couple of days with the source from commit 2c902c3, from the 5th of December from master. Will check the latest version! |
I can confirm that the latest version of master solves this issue. |
Sweet, thanks for checking |
We are using Stash in combination with JIRA. The branch names can contain a JIRA issue key, for example 'TOHISP-71'. Or: 'feature/TOHISP-71'.
Consider the following commit messages and pull requests and the logic in MergeMessageParser.cs:
"Merge pull request #2 in customer/project from feature/TOHISP-71 to master"
Will not result in a version.
"Merge pull request #4 in customer/project from TOHISP-52 to master"
Will result in a major version equal to '52'. Which is not correct.
Note that the repository is called 'customer/project' and contains a forward slash. The code in MergeMessageParser.cs counts the number of forward slashes when parsing a pull request merge and this fails when the repository name contains a forward slash and the branch name contains a JIRA issue key.
The logic which parses a merged branch also fails when the branch name contains a JIRA issue key.
Commit message example: "Merge branch 'feature/TOHISP-52' into release/1.4.0"
This results in a major version equal to '52'.
The logic splits the message by using a dash and takes the second hit. But the dash can be present X-times.
Repository names in Stash can contain a forward slash. And branch names can be equal to a single JIRA issue key which contains a dash and a number.
This issue is present in commit 2c902c3.
The text was updated successfully, but these errors were encountered: