zeke / semantic-pull-requests

:robot: Let the robots take care of the semantic versioning
https://github.com/apps/semantic-pull-requests
Apache License 2.0
1.24k stars 122 forks source link

Allow to configure prefered merge method #117

Closed jGleitz closed 2 years ago

jGleitz commented 3 years ago

Currently, with titleAndCommits: true, the check will report “ready to be squashed” if a PR title is semantic, even if all commits are semantic. This probably makes sense for people who prefer squashing over merging or rebasing.

I prefer rebasing over squashing, so for me, it would be much more useful to read “ready to be rebased” if all commits are semantic and the PR title is too. With the current behaviour, if the PR author wrote a semantic PR title, I still have to check all commit messages manually to see if I can rebase.

Proposal: Add a setting like preferredMergeStrategy. If it is set to squash (should be the default to keep the current behaviour), the check behaves as it does now. If it is set to rebase or merge, the check will evaluate the commit messages before it evaluates the title, i.e. display “ready to be merged or rebased” whenever all commits are semantic.

stephenmathieson commented 3 years ago

Are you asking about the messaging in the bot, or the label on the "merge button"? If you're asking about the button, I'm not sure this is possible. It's been awhile since I looked, but I don't believe GitHub has an API for changing this at the individual PR level.

jGleitz commented 3 years ago

My main concern is the messaging of the bot. If the bot could also influence the button, that would be nice to have, of course. The message is more important to me, though.

zeke commented 2 years ago

This issue is old and inactive so I'm going to close it. If anyone is still affected by this, let me know and I'll re-open it.