(MAJOR)/(MINOR) in merge commit message seems to be ignored
When a branch is merged as a merge commit, the check for (MAJOR)/(MINOR) doesn't seem to be done on the message of the merge commit. It seems to be done only on the predecessors of the merge commit coming from the branch.
See for example the repo test-public-repo and the output of the workflow https://github.com/GMZwinge/test-public-repo/actions/workflows/test-semantic-version.yml for 3 different cases:
-
(MINOR)in commit message, no(MINOR)in PR: minor is incremented. -
(MINOR)in commit message,(MINOR)in PR: minor is incremented. -
no
(MINOR)in commit message,(MINOR)in PR: patch is incremented even though the PR title ends up in the merge commit message on main.
The repo is configured so that the PR title is used in the merged commit message. It uses the setting (x) Allow merge commits and the Default commit message set to Pull request title instead of the Default message. Using the Pull request title allows one to add (MAJOR) or (MINOR) to the PR title before merging to direct this action to increment major or minor version instead of patch.
@GMZwinge, thanks for putting together the example repo. I have been quite sick in the past week or so and unable to do much dev, but I'll have a look when I get a chance.
@PaulHatch No worry, no hurry and take care of yourself. We have a workaround using the repo setting so that only squash and merge is allowed and merge commit is not.