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
It looks like you're new here. Sign in or register to get started.