I am trying to creat a pull request via API. I am using Bitbucket app for authentification and I would like to ask you, what scope do I need to allow to be able to create a PR with close_source_branch set to TRUE?
Everytime I am tryign to creat a PR, I get error message:
{“type”: “error”, “error”: {“message”: “You are restricted from closing the source branch.”}}
I’m using bitbucket cloud, and an app password which has the pullrequest:write permission.
Submitting a pull request with close_source_branch: true was working before.
Then after setting per-branch permissions to:
master: write: nobody, merge via pull request: my account
update-*: write: everybody, merge via pull request: everybody
it stopped working.
It wound up being issue that i didn’t allow deleting of the update-* branch as well in the branch permissions. After fixing that, close_source_branch: true works.