Prevent changing commit message when merging PR

We’re tracking the release scope by checking commit messages for ticket patterns of issue tracking tool.

We have a git hook that does not allow pushing any commit without the ticket being mentioned.

However, when we’re merging the pull-request to master branch, the developer is able to tune the commit message - and by accident, remove the ticket name - in that case, we’ll loose visibility of what tickets were released (we’re releasing from master branch).

Is there any way to disallow people to change the commit message when merging PR on GitHub?

1 Like

Hi @shalak :wave:

At present, there is no feature to accommodate this workflow.

We’re always working to improve GitHub and the GitHub Support Community, and we consider every suggestion we receive.
Would you mind submitting this through our official product feedback form so that our product team can track your request?

1 Like