-
Notifications
You must be signed in to change notification settings - Fork 652
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]? no minor version detected on pull request that contains organization name #3183
Comments
To me, this looks like a merge from a remote into a local Also, the fact that you're using a
If you absolutely want to do remote merges the way you do and have branches named |
It is actually a merge which is executed by Github when merging a pullrequest, creating a merge commit. I don't know why the organization name is added in the commit message, however the branch is plainly
What mode would you suggest in this case? |
If you are closer to a Git Flow development model with |
I have taken a look into the code and saw unit tests which are testing the behavior as following: private static readonly object?[] GitHubPullPullMergeMessages =
{
new object?[] { "Merge pull request #1234 from feature/one", "feature/one", null, null, 1234 },
new object?[] { "Merge pull request #1234 in feature/one", "feature/one", null, null, 1234 },
new object?[] { "Merge pull request #1234 in v4.0.0", "v4.0.0", null, new SemanticVersion(4), 1234 },
new object?[] { "Merge pull request #1234 from origin/feature/one", "origin/feature/one", null, null, 1234 },
new object?[] { "Merge pull request #1234 in feature/4.1.0/one", "feature/4.1.0/one", null, new SemanticVersion(4,1), 1234 },
new object?[] { "Merge pull request #1234 in V://10.10.10.10", "V://10.10.10.10", null, null, 1234 },
new object?[] { "Merge pull request #1234 from feature/one into dev", "feature/one", "dev", null, 1234 }
};
[TestCaseSource(nameof(GitHubPullPullMergeMessages))]
public void ParsesGitHubPullMergeMessage(
string message,
string expectedMergedBranch,
string expectedTargetBranch,
SemanticVersion expectedVersion,
int? expectedPullRequestNumber)
{
// Act
var sut = new MergeMessage(message, this.configuration);
// Assert
sut.FormatName.ShouldBe("GitHubPull");
sut.TargetBranch.ShouldBe(expectedTargetBranch);
sut.MergedBranch.ShouldBe(expectedMergedBranch);
sut.IsMergedPullRequest.ShouldBeTrue();
sut.PullRequestNumber.ShouldBe(expectedPullRequestNumber);
sut.Version.ShouldBe(expectedVersion);
} What me supprised is that indeed like @ooredm explained it the organization name is (always?) part of the merge message in git hub: |
@ooredm To workaround this I would suggest you to change the configuration and place the following string: merge-message-formats:
Custom: '^Merge pull request #(?<PullRequestNumber>\d+) (from|in) (?:[^\s\/]+\/)?(?<SourceBranch>[^\s]*)(?: into (?<TargetBranch>[^\s]*))*' |
Closed by #3424 |
🎉 This issue has been resolved in version 6.0.0-beta.2 🎉 Your GitReleaseManager bot 📦🚀 |
Context: MainlineMode.
No minor increment on merge message that contains an organization name, e.g:
"Merge pull request #1 from bananaCorp/develop"
This is the default pull request message of GitHub for an organization.
The default regex for a develop branch is, "^dev(elop)?(ment)?$", due to this the branch is not detected by the MainLineVersionCalculator, as it sees "bananaCorp/develop" as the branch. We can work around this by changing the regex to "dev(elop)?(ment)?$".
My question is if this is the intended behavior, and for what reason.
Thanks in advance.
The text was updated successfully, but these errors were encountered: