Hey Atlassian
How can I setup my repo to allow only pushes to branches with pre-defined branchname prefixes and refuse everything else? At this moment for a repo without repo permissions everything is allowed. But I would like to say nothing is allowed except for the branches I add to branch permissions. Can this be configured somehow?
With kind regards,
Ruben Labruyere
DevOps Engineer
Dover Fueling Solutions
Hello @ruben.labruyere,
This is possible by setting a restrictive branch permission for * pattern and a permissive branch permission for every whitelisted prefix, e.g. prefix/*
Here's an example I tried with:
If your prefixes match some branching model types, it probably makes sense to define them in branching model settings and then use branch types here instead of patterns.
Hope this helps. Let me know if you have any questions.
Cheers,
Daniil
Hi Daniil
I gave it a try but it does not entirely work. For example, I tried deleting a release branch but was not allowed despite the checkbox being enabled. This is my following setup:
As you can see I added the * rule which says "nothing is allowed". Including not deleting or rewriting branch history. But I did enable the "allow deleting this branch" for the release branch. But apparently the * rule still has priority and as a result I cannot delete my branch.. ._.
I feel like this setup is more counter-productive as productive as it now allows everything and does not allow us admins to restrict branches like I am trying to do resulting in everyone can be doing basically everything. Can you guys not include a checkbox in the settings that says "allow nothing except for the configurations in the branch permissions screen?"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.