semantic-version icon indicating copy to clipboard operation
semantic-version copied to clipboard

(MAJOR)/(MINOR) in merge commit message seems to be ignored

Open GMZwinge opened this issue 1 year ago • 3 comments

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:

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 avatar Mar 08 '24 22:03 GMZwinge

@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 avatar Mar 25 '24 06:03 PaulHatch

@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.

GMZwinge avatar Mar 25 '24 18:03 GMZwinge