Preventing merges of old feature branches

We have occasionally had issues with feature branch builds passing, being merged to develop, and then develop builds failing because the feature branch was so old it does something no longer relevant or correct.

Does BitBucket (we have the self-hosted version, v5.1.1) have a way to prevent pull requests from being merged if the feature branch is "too far behind" the target branch? I think another way of describing it is preventing merging to a target branch of the last common ancestor is X commits behind the target branch's latest commit.

1 answer

1 accepted

0 vote
Mikael Sandberg Community Champion Nov 16, 2017

No, Bitbucket does not have such a feature. You would need an app for it, like ScriptRunner. If my memory servers me correctly there was another app that I looked at that had a solution for it, let me see if I can find out which one.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
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...

1,756 views 1 5
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