HiveBrain v1.2.0
Get Started
← Back to all entries
snippetMinor

How to close a branch by default after a pull request has been merged in Bitbucket?

Submitted by: @import:stackexchange-devops··
0
Viewed 0 times
afterclosepullrequestbitbucketbeenhasdefaultmergedhow

Problem

By default a branch will remain in Bitbucket when a Pull Request (PR) has been merged. How to ensure that a branch will be removed after a PR has been removed?

When the option is enabled then the branch will be removed after the merge of a PR, but how to ensure that it is clicked by default to prevent that creators of the PR forget to click it and the branch remains in bitbucket?

Solution

What I really want is to add a comment to the accepted answer, but I don't have enough reputation to do so. So I'll note it here. I've closed BSERV-10344 because it's in the wrong tracker. This question is about Bitbucket Cloud (bitbucket.org), not Bitbucket Server (the behind-the-firewall version). The correct issue tracker for the feature request is at https://bitbucket.org/site/master/issues.

Also, re: "I'm not sure why they use different language for that", it's because Bitbucket Cloud supports Mercurial as well as Git. In Mercurial it's not possible to delete a named branch; they can only be closed. Since its support for Mercurial predates its support for Git, the terminology used is to "close" the branch.

Context

StackExchange DevOps Q#2649, answer score: 6

Revisions (0)

No revisions yet.