Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Inconsistent merge commit messages

Peter Walter March 4, 2019

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.

1 answer

0 votes
Foong
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 6, 2019

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.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events