How can I configure the merge check in bitbucket to only allow a merge when at least one commit message contains the following two strings (The first is a Jira ID, second is another tracking number we need for each pull request):
RPD-1234 PROD12345678
I have tried a few different ways of the following regular expression in the merge check "Common Checks" "Syntax Check"
(\b|^)RPD-\d+\bPROD\d+
This does not allow a commit message as follows, even though it has the correct strings:
RPD-2114 PROD0012345678 mergeCheckRegularExpression
If I have to use Common Checks I can deal with forcing this on all commit messages, but that is not ideal.
There is a space in between so the syntax should be "(\b|^)RPD-\d+ \bPROD\d+" (with a space in between).
Use this site https://regexr.com/ to test the syntax.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.