Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to force specific branche naming conventions Edited

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

1 answer

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:

 Branch permissions — Bitbucket 2020-02-19 00-45-53.png

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:

Capture.PNGAs 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?"

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket

New improvements to user management in Bitbucket Cloud 👥

Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...

254 views 2 9
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you