Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Bitbucket Cloud seperate merge vs push permissions

James Fryer December 15, 2015

Is there any way in Bitbucket Cloud to only allow merge permission on the master branch? 

 

Basically what I am looking to do is make it possible for developers to submit and merge pull requests, but prevent any unintended pushes to master.

 

From this article: https://confluence.atlassian.com/bitbucket/branch-management-385912271.html, as far as I can see I can lock down a branch write access entirely however it doesn't seem to have the granularity to allow merge but not push. From what I can work out I can effectively disable write permissions by using the "Limit Pushes to specific users and groups" and assigning it to an empty group, but this means that no one can merge pull requests.

 

However this article (for Bitbucket Server): https://confluence.atlassian.com/bitbucketserver/using-branch-permissions-776639807.html, seems to have the functionality I wanted, but I would prefer to use the cloud version of Bitbucket.

2 answers

0 votes
Mike Friedrich
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.
December 15, 2015

You could use a plug in to do an auto merge based on some rules using a "service account".

evzijst
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 16, 2015

Yes, a Connect Add-On could potentially automate the gate keeper workflow.

0 votes
evzijst
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 15, 2015

You are correct. Bitbucket Cloud's branch restrictions regulate write access and are blind to PR merge vs push.

We might add this distinction in the future when pull requests get merge checks, similar to Server, but for now there is no way to force the use of pull requests, unless you restrict master to all but a single "gate keeper" developer who performs all merges.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events