Prevent push on branch with a pull request

How can i prevent a PUSH to a bransh that have a on-going Pull Request?

I were using the 'workflow' plugin for that but it don't work with Stash 2.6+

2 answers

1 accepted

Hi Charles,

In our workflow we block the branch during review to prevent any case of accidental PUSH in a branch that is been reviewed.

I followed your advice and found that the vendor is working to bring this plugin up to date with stash. (https://bitbucket.org/izymesdev/workzone/issue/23/compatibility-to-stash-26)

anyway, Thanks.

Hi Bruno,

If you don't mind me asking, what is the reason for blocking the push? I ask because, at least for our workflow, we almost always need to push changes to respond from comment feedback.

The Workflow plugin sounds like it solves that problem, what errors are you getting in the Stash logs? You might want to contact the vendor and let them know.

If you get stuck, I could probably help with a plugin that prevents pushes in that case. We have a very similar plugin already that blocks target branch deletions on open pull requests:

https://marketplace.atlassian.com/plugins/com.atlassian.stash.plugin.stash-protect-unmerged-branch-hook

Cheers,

Charles

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

657 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