When doing a squash merge, following a successful Pull Request, on github I would like to validate that the squash merge commit message contains a Jira ticket number. If it does not the squash merge should fail until a proper commit message is entred by the user.
Right now this needs to be done manually and sometimes I forget to include the ticket number I would like an automatic way to make sure I don't forget to do it.
- I know that I can use hooks locally to force a Jira Ticket number but I dont care about how the user work on his on branch. I really just want the protected branch commits to all start with a Jira ticket
- I do not have github entreprise so I can't use a pre-receive hook.
- I have look into github action but not sure this is the proper way to go.
Some Reference but no solutions: