How do I enable Bitbucket Branching Model inheritance via the API?

Viewed 214

In the bitbucket interface, there is a toggle that you can click to inherit branching strategies at the top level for a project from the repository's project group settings. I have over 100 of these I need to go through. Is there a call to the REST API that I can make that would set it?

the toggle.

1 Answers

I've been looking for a same solution, but it appears the API doesn't cover this functionality (yet).

I've played around with all manor of API calls/parameters in an attempt to discover the right variable. Even inspecting the payload from the web UI but sadly no luck. I think we're just gonna have to wait.. that or loop through each repo and apply the same configuration.

There is currently a side effect when using this API endpoint. If the repository is inheriting branching model settings from its project, updating the branching model for this repository will disable the project setting inheritance. We have deprecated this side effect and will remove it on 1 August 2022.

https://developer.atlassian.com/cloud/bitbucket/rest/api-group-branching-model/#api-repositories-workspace-repo-slug-branching-model-settings-put

Related