Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Branch Permissions - only allow commits via pull request

Nikolaj Munch
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 5, 2018

I have been playing with branch permissions for a while, and i still don't understand how it actually works, or if it even works...

 

I'm working with 3 permissions!

  • "*"
    • Prevent all changes:
    • Prevent deletion:
    • Prevent rewriting history:
    • Prevent changes without a pull request:
  • "feature/JIRA-ID"
    • Prevent all changes: except by developers and testers
    • Prevent deletion: except by developers and testers
    • Prevent rewriting history: except by developers and testers
    • Prevent changes without a pull request: except by developers and testers
  • "develop"
    • Prevent all changes: except by techleads
    • Prevent deletion:
    • Prevent rewriting history:
    • Prevent changes without a pull request: except by techleads

 

Thats easy to setup (i'm missing regex in branch pattern), but then i run into problems...

- The developers are able to create a pull request from feature -> develop as expected, but when the PR is approved and successful build on our CI the "merge" button is still grayed out and after clicking for details the following message is shown: "You have insufficient permissions to update 'develop'. Check your branch permissions with the project administrator."

- If i add developers to the Prevent all changes exception at the develop branch, they are able to hit the merge button, but then they can do anything?!?

 

Similar i have struggled with delete permissions!

  • I created a branch called nimun.
  • Set the following permissions:
    • "nimun"

      • Prevent all changes: 
      • Prevent deletion: except by me
      • Prevent rewriting history:
      • Prevent changes without a pull request:
  • Then i tried to delete the branch and got the following message:
    • Branch 'nimun' could not be deleted 'refs/heads/nimun' is read-only. Check your branch permissions configuration with the project administrator.

- If i add me to the Prevent all changes exception at the nimun branch, i'm able to delete the branch, but that's not what i want?!?

 

I hope someone are able to help me clarify how to properly manage branch permissions! :) 

//Nikolaj

 

(we are running Bitbucket 5.8 )

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events