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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Can I set branch restrictions to a more specific pattern than a general pattern already configured?

I have branch restrictions configured for all our release branches (branch name starts with "release-", of which there are many - too many and too dynamic to list all). Is is possible to add restrictions for a single release branch, say release-23.1, without impacting the restrictions for the other release branches?

Details: I have branch restrictions for "release-*" that forces team members to merge through PRs. But if I create an additional branch restriction for "release-23.1" to only allow merges by Admins, the restrictions from "release-*" essentially override the more restrictive settings and allow merging from anyone on the team.

Use case: We have long running release branches, and need to prevent commits on a single branch after code freeze, before we go GA, and still allow normal activity on the other release branches.

1 answer

1 accepted

0 votes
Answer accepted

Hi Mark,

In case branch permissions overlap, the results are specified in the table here:

If "Merge access via pull requests" is set up as follows:

Merge access via pull requests: Developers, Administrators

Merge access via pull requests: Administrators

Then both Administrators and Developers will be able to merge to release-23.1

You could change the "Merge access via pull requests" for release-* to Everybody. Everybody in this case means everybody with write access to the repo. In this case, only Administrators will be able to merge to release-23.1

If you don't want to change "Merge access via pull requests" for release-* to Everybody, then the only other way I can think of for achieving what you want would be by renaming the branch release-23.1 so that it doesn't overlap with the pattern release-* and create a separate branch restriction for that branch.

Kind regards,

Thanks, Theodora. If we implemented the first suggestion, then developers (e.g. non-Admins) wouldn't be able to merge to any release branches - something we wouldn't want to prevent, since we're only looking to prevent this for one release branch, release-23.1.

Implementing the second suggestion would likely break automation we have for managing different releases - e.g. switching branches, build artifacts, CI, etc.

By any chance, is allowing multiple branch patterns including a negative pattern on the roadmap? For example, being able to set the pattern for one branch restriction to "release-*, !release-23.1"?

Hi Mark,

With the first suggestion, all users (with write access) would be able to merge to any release branches, except for release-23.1. Only administrators would be able to merge to release-23.1.

I am talking about a configuration like the following:

Screenshot 2023-01-09 at 13.13.37.png

Screenshot 2023-01-09 at 13.14.10.png

Is this something that works for you?

By any chance, is allowing multiple branch patterns including a negative pattern on the roadmap? For example, being able to set the pattern for one branch restriction to "release-*, !release-23.1"?

This is not on the roadmap at the moment, we have a feature request for allowing multiple branches in the same branch permission: I can create one for negating a pattern as well if you'd be interested in that, please feel free to let me know if you would like me to create it.

Kind regards,

Hi Theodora,

I appreciate the detailed examples. We'll give this a try, although it might not be until our next major release in April, if we're unable to try it out now.

No need to enter a request for a negative pattern at this time.



Hi Mark,

You are very welcome. If you need anything further, please feel free to reach out.

Kind regards,

Suggest an answer

Log in or Sign up to answer
Site Admin

Atlassian Community Events