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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jun 12, 2018 in Bitbucket

Do you use any Atlassian products for your personal projects?

After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...

31,340 views 26 12
Join discussion

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