How to limit pushes, but allow pull requests?

Marijn Otte July 9, 2015

Hi,

 

I want to disallow commits (pushes) to the "develop" branch, because all code needs to be pushed to a separate branch and must me merged to the "develop" branche with a pull request.

 

When I use "Branche management" and limit the pushes, merging the pull request is also restricted.

 

Is it possible to disallow a direct push to a branch, but allow merge of a pull request?

 

 

Marijn

3 answers

0 votes
Deleted user November 14, 2015

I'm trying this too! 

Prevent any user from push (https://confluence.atlassian.com/bitbucket/branch-management-385912271.html) has no utility if blocks merge in pull requests!! =/

 

 

 

0 votes
Marijn Otte July 13, 2015

Hi Harry,

Thank you for your answer. Unfortunately your solution seems to be for Stash only. For Bitbucket this is still a feature request (https://bitbucket.org/site/master/issues/5658/allow-custom-pre-receive-hook-that-rejects).

 

Marijn

0 votes
HarryH
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 10, 2015

You can write a pre-recieve hook to deny pushes to certain branches.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events