I've been experimenting with branch permissions on bitbucket cloud recently, and found some weird logic that seems to get applied, and I'm wondering whether it's supposed to work that way, or if I found bugs.
In short, we don't want to allow any commits to master direct, only PR's will be allowed there, all changes (bugfixes and new features) should be done via specific branches and merged to master after PR. Then we would like to standardize which branch names we allow to be created on our bitbucket instance. For features, they should start with feature/*, for bugfixes they should be bugfix/* (the slash groups things nicely together in sourcetree). We don't want to allow users to create branches with any other naming pattern.
First oddity I noticed was in regards to the 'Everyone' group that can be selected when configuring branch permissions. We only have one group with write access per repository, so using that group ("<reponame>-developers") should have the same effect as using 'Everyone'. So I created 4 branch permissions:
So the idea here is that topmost * pattern will prevent any non-standardized branch names to be created. The feature and bugfix ones are the exception on this. Stangly when using the 'Everyone' group, this does not work, users who do have write access can not create branches which should be allowed (e.g. 'freature/somefeature'). When I replace the 'Everyone' group with their designated developer group, this works perfectly. This isn't a big deal but sounds like a bug to me?
OK, so I replace 'Everyone' with the developer group and continue testing. Now I can do everything I expect to, I can create 'freature/*' and 'bugfix/*' branches and merge them into master, no problem. Only when I try to delete those feature and bugfix branches, it doesn't allow me to do this. I clearly checked 'Allow deleting this branch' on the feature and bugfix permissions, but this does not seem to overrule the default '*' pattern permission. Only if I remove that permission (or allow our developers group to write to it), can I delete those branches. It seems to me that if the 'feature/*' pattern overrules the '*' permission when creating and committing/pushing to these branches, the delete permission should also be overruled, no?
Badges are a great way to show off community activity, whether you’re a newbie or a Champion.Learn more
Planning and grooming sessions all come with their own sets of rules. Team members meet to estimate stories or other work items, all according to an agreed-upon process. And with every session comes ...
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!
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