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

Next challenges

Recent achievements

Recognition

  • Give kudos
  • My kudos

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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!

 

 

1 answer

1 accepted

0 votes
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

Suggest an answer

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

Powering DevOps with Bitbucket Server & Data Center

Hi everyone, The Cloud team recently announced 12 new DevOps features that help developers ship better code, faster   ! While we’re all excited about the new improvements to Bitbucket ...

1,898 views 0 7
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