The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

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

jimmy.askew
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 14, 2020

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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

1 vote
Answer accepted
Daniil Penkin
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 14, 2020

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

0 votes
Jason Harrison
Contributor
April 13, 2021

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.

TAGS
AUG Leaders

Atlassian Community Events