We are looking at options for validating squash & merge commit messages, to ensure they begin with a JIRA ticket ID. Minimally, we will do a regular expression check, and we’re considering a JIRA API query to verify the ticket is valid.
To this point I haven’t found a solution for where to run this check. Initially I planned on a GitHub Action, but I don’t believe there are any events which could intercept the merge. I also looked at using a pre-receive hook, but we have GitHub Enterprise Cloud, not Server, and pre-receive hooks are apparently Enterprise Server only.
Does anyone have suggestions on how we could validate merge commit messages?