JIRA Hooks for Bitbucket plugin - Branch Regular Expression

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

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?

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

Either way, I found the instructions quite confusing!

Hi,

yes the regular expression reacts on the target branch.

Does this solve your problem?

Cheers

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?

Suggest an answer

Log in or Join to answer
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

648 views 0 4
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot