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 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,953 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