Cannot create PRs in Bitbucket if branch deletion is disabled #36472
Unanswered
bkelley17
asked this question in
Request Help
Replies: 1 comment
-
|
Setting it to true benefits most users - the ones who don't have this restriction. My preference order would be:
But why do you have such a setting, and what are the other implications? Does it mean branches can never be reused either? This will also cause problems with Renovate. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
How are you running Renovate?
Self-hosted Renovate
If you're self-hosting Renovate, tell us which platform (GitHub, GitLab, etc) and which version of Renovate.
bitbucket cloud
Please tell us more about your question or problem
When Renovate creates PRs in Bitbucket it sets
close_source_branch: true. This indicates that you would like to delete the source branch after the PR is merged. https://github.com/renovatebot/renovate/blob/main/lib/modules/platform/bitbucket/index.ts#L928This is a problem if branch restrictions disable the deletion of the source branch. (Settngs -> Branch Restrictions -> (branch pattern) ->
Deleting this branch is not allowed) The PR creation fails with this error from BitbucketYou are restricted from closing the source branch.Possibly this attribute could be omitted when making the PR creation call to BB, or else set to false.
Logs (if relevant)
No response
Beta Was this translation helpful? Give feedback.
All reactions