Add ability to validate commit messages for deployments
We require commit messages for deployments, but we actually need to go beyond this and validate the commit message format, checking for things like tagging ticket numbers in commit messages, formatting, etc.
If the commit message validation fails, deployment should not be allowed.
Some source control providers (e.g. GitHub) allow server-side pre-receive Git hooks which can perform such commit message validation; however, Bitbucket Cloud does not currently support this and it is unrealistic for us to switch source control at this point in time. Without this feature in Gearset we are unable to enforce formatting requirements on commit messages coming from Gearset.
Example validation checks could include things like:
- ensure minimum commit message length
- check for patterns matching one or more regular expressions
- etc.
