1

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.

  1. 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
  2. I do not have github entreprise so I can't use a pre-receive hook.
  3. I have look into github action but not sure this is the proper way to go.

Some Reference but no solutions:

  1. Ensure github PR squash merge commit comments contain issue ID
  2. https://github.com/github/feedback/discussions/8688

0 Answers0