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: 

JIRA Hooks for Bitbucket plugin - Branch Regular Expression

David Harper
April 13, 2016

When enabling the merge check plugin, I'm trying to run checks only for feature and bugfix branches (standard Bitbucket naming convention) but can't seem to get the regular expression to pick them up

I'm thinking something like this: (feature|bugfix)/(.*) as we don't know what the branch is going to be called, only that it is going to start with bugfix/ or feature/

Any ideas?

4 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
David Harper
May 5, 2016

It does thanks. Maybe the text that says:

"Only branches, which will match this regular expression will be handled by the hook. If a branch does not match, the hook will skip the evaluation."

Could be changed to

"Only target branches of the merge which match this regular expression will be handled by the hook. If a branch does not match, the hook will skip the evaluation."

As that is much clearer to me?

0 votes
Benjamin Mueller
Contributor
May 5, 2016

Hi,

yes the regular expression reacts on the target branch.

Does this solve your problem?

Cheers

0 votes
David Harper
April 13, 2016

Or does the field mean 'Target Branch' in the case of merge checks?

Either way, I found the instructions quite confusing!

0 votes
David Harper
April 13, 2016

In fact, if I set the field to 'develop' or empty then for a branch named 'feature/WFBO-4160-update-etailers-welcome-fullname' the merge protection starts working. Is the description of the field wrong and it's actually which branches do you want to ignore rather than enable?

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

AUG Leaders

Atlassian Community Events