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

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

Is there an easy way to copy a repositories settings to another repository?

PROBLEM:

Each time I set up a new repository the underlying branch permissions, branching model and users/groups have to be manually entered, Is there any way to speed up this process?

THINGS I'VE TRIED:

Bitbucket Cloud Rest API: I've tried automating repository creation by creating the repo and the underlying settings through the API, this has been partially successful, though I've found with the Branch Permissions you cannot simply "get" those from another repo, remove the ID's and "post" to give you an identical repository setup.

Python Libraries: I've tried a couple but I've found they either need to be re-worked for bitbucket cloud (they all seem to be for Bitbucket Server and those that aren't don't seem to be up to date)

 

Any advice on tools people may have used in the past would be appreciated!

 

 

3 answers

1 accepted

1 vote
Answer accepted

Hello @jimmy.askew ,

Welcome to the Community!

There's no such tool in Bitbucket UI, and I'm not aware of any third-party add-ons that would do this, unfortunately. However, this should be feasible with REST API.

 I've found with the Branch Permissions you cannot simply "get" those from another repo, remove the ID's and "post" to give you an identical repository setup.

Hm, this should work with this endpoint. Note that it expects one restriction per call, maybe that was the problem? See this thread, for example.

Hope this helps. Let me know if you have any questions.

Cheers,
Daniil

I also would like to be able to do this. Or at least set the settings up at the administrative level so that all new repositories have a standard template of settings, README.md and .gitignore.

Though I'd be happy with just the bitbucket settings.

Suggest an answer

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

How do you use the Bitbucket-Jira integration? How does it help your team?

Hey everyone, over the past year, we've added several new features on how you can use Bitbucket and Jira together. We'd love to know how you'll are using the integration and how it's helping your t...

164 views 0 2
Join discussion

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