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

Unable to create default branch during repository creation with branch permissions

Lee Hull January 5, 2024

We have global branch permission setup on the project to ensure developers/admin is not checking directly to master

  • Branch: master
  • Write Access: None
  • Merge via Pull Request: Admin

 

The issue is, when we created a new repository or if a developer creates a new repository, its missing the default branch and they cannot create it, how is this expected to work?

They can create other branches but "master" is missing, so they wouldn't be able to create a pull request for that

1 answer

0 votes
Syahrul
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 7, 2024

G'day, @Lee Hull 

Based on your description, the behavior you're encountering appears to be expected, as you've set the master branch permission in your project to 'none.' Consequently, when a user creates a repository within the project that includes a master branch, the restrictions will be enforced, possibly resulting in the absence of the branch.

We currently have a feature request to permit branch creation even with branch restrictions applied in project settings, which you can view here: https://jira.atlassian.com/browse/BCLOUD-22710

In the meantime, a possible workaround is to include a Workspace/Project admin in the project branch restrictions. This would allow for the creation of a repository with a master branch.

Regards,
Syahrul

Lee Hull January 12, 2024

Thanks,

The issue is, we are allowing developers and myself to be able to create repositories, but we have to bypass the entire branch permission or add ourselves to "check in without a PR" which is a violation of our audit policy.

Our audit policy requires a PR before making any changes but in order to follow that, we have to temporarily add a bypass in the branch permissions before creating the repository, that process is currently very inconvenient as we have to request the changes from our administration

Syahrul
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 15, 2024

Hi @Lee Hull 

Thank you for providing more details. I recommend adding comments to the feature request about your specific use case. This will increase its visibility with our project team.

Additionally, you may want to consider an alternative approach. You can initially create a repository in a different project and then transfer it to the project with the branch restriction. This method circumvents the need to modify the rules each time you need to create a new repository, serving as a temporary solution.

Regards,
Syahrul

Like Sabine Mayer likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events