Feature request: PR commit message & merge type must be approved

Hi there.

In our team, we have two situations which occur fairly reguarly, which we feel Github could be more useful in addressing.

Firstly, when a PR passes test and gets peer approval, it is ready to be merged. But the person merging the PR writes a goofy commit message, perhaps has a spelling mistake or a format which doesn’t adhere to our internal guidelines.

Secondly, for some of our repos, we utilize two different merge types. For feature -> dev branch, we want to enforce squash commits. For dev -> master branch, we want to enforce merge commits. This is mor than an asthetic requirement, we use tools as part of our CI to make use of this history, and expect it to be clean and well formatted.

We have  made use of tools like danger.js to perform checks as part of our CI, to check the PR title, etc, but it’s not really sufficient for these needs. We have also considered ignoring these issues and relying solely on a changelog or other techniques, but this doesn’t really address the issue at its core.

Currently, there is no way to achieve these outcomes that I can see with Github. It may in fact be an impossible task conceptually to set these policies up via some sort of configuration in a workable fashion. But we would at least like to be able to have the PR author indicate their intent by stipulating the merge type and the commit message as part of the approval process. In this way, at least those choices are checked by reviewers and this will help prevent any obvious errors.

What do you think? I appreciate your consideration.

1 Like

Hi @mrrhysbutler ,

Thanks for this feedback! We’re always working to improve GitHub and the GitHub Community Forum, and we consider every suggestion we receive. I’ve logged your feature request in our internal feature request list. Though I can’t guarantee anything or share a timeline for this, I can tell you that it’s been shared with the appropriate teams for consideration.

Cheers!

1 Like