The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

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.

TAGS
AUG Leaders

Atlassian Community Events