Atlassian finally provided an option to set source branch deletion when a pull request is created. Instead of pointing-and-clicking the option for each of our repos (a lot of them), how can I set it via API? The option is on this page, on the section Delete source branch by default
https://bitbucket.org/<workspace>/<repo>/admin/branching-model
G'day, @Chris Fouts
I believe we do have an API endpoint to update this config at:
Update the branching model config for a repository
This may not be updated, but you just need the default_branch_deletion flag to be true for turning on or false for turning off:
{
"default_branch_deletion": "false"
}
I hope this helps.
Regards,
Syahrul
Online 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.