Hello,
for testing new Bitbucket version I've cloned our production server and renamed it to "test". The problem is, I don't want to have production repos on this "test" instance because of security reasons, but as far I understood in order to remove all projects I need to remove associated repos first, every one by opening it and click "delete" button. I have around 100 repos, is there another way to automate/speed up it?
Thanks,
Stan
Your could use the REST API and create a script to remove the repositories. /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug} has an option for delete.
Forgive the advertising but you can do this with ScriptRunner for Bitbucket Server.
Please see this example which can be run in Admin -> ScriptRunner -> Script Console and will remove all repositories for a particular project and could easily be adapted to your needs.
Its worth checking out if you want to automate particular tasks in Bitbucket Server or customise your instance.
You can find out more from the documentation about how ScriptRunner for Bitbucket Server can help you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I forgave you very quickly - since this solved my issue the most elegant way. Thank you for sharing the knowledge and the product :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Atlassian Government Cloud has achieved FedRAMP Authorization at the Moderate level! Join our webinar to learn how you can accelerate mission success and move work forward faster in cloud, all while ensuring your critical data is secure.
Register NowOnline forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.