Uploaded image for project: 'Bitbucket Cloud'
  1. Bitbucket Cloud
  2. BCLOUD-21661

Set "delete source branch" as default for all pull-requests

    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

      Hi Atlassian Team,

      as far as I can see there is no way to enable the flag "delete source branch" per default for all pull-requests. 

      Background: some developers forget to click this checkbox when creating a pull request. After merging the source branch still exists.

      It would be great if we could define "delete source branch" as default for all pull requests. So a developer has to unset it if he doesn't want to delete the source branch (which is only for some seldom cases).

       

      Thanks

      Matthias

       


      Latest update from Atlassian 2024-10-21

      Bitbucket Cloud has started work on an option in repo settings (and project settings) that controls the default for "delete source branch after the PR is merged". We'll post an update here when the feature is available.

            [BCLOUD-21661] Set "delete source branch" as default for all pull-requests

            softreigns added a comment -

            +1

            softreigns added a comment - +1

            +1

            Simplatex added a comment -

            +1

            Simplatex added a comment - +1

            +1

            Wow, progress after only 3 years from the initial highly requested feature request: https://jira.atlassian.com/browse/BCLOUD-12503

             

            If only we could finally get Work In Progress PRs after 8 years .... https://jira.atlassian.com/browse/BCLOUD-12503

             

            Great, thx Atlassian

            Simon Fischer added a comment - Wow, progress after only 3 years from the initial highly requested feature request: https://jira.atlassian.com/browse/BCLOUD-12503   If only we could finally get Work In Progress PRs after 8 years .... https://jira.atlassian.com/browse/BCLOUD-12503   Great, thx Atlassian

            Hi all 👋 As mentioned on related suggestion BCLOUD-15300, Bitbucket Cloud has started work on an option in repo settings (and project settings) that controls the default for "delete source branch after the PR is merged". We'll post an update here when the feature is available.

            Dave Parrish [Atlassian] added a comment - Hi all 👋 As mentioned on related suggestion BCLOUD-15300 , Bitbucket Cloud has started work on an option in repo settings (and project settings) that controls the default for "delete source branch after the PR is merged". We'll post an update here when the feature is available.

            + 1

            This would really help my team.

            Andrew Feeney added a comment - + 1 This would really help my team.

            Bert Oost added a comment -

            We have created a hook to update the PR close-branch setting after a pull request is created.
            Therefore we do not see this change in the activity timeline. Would be nice to see that.

            For this +1

            Bert Oost added a comment - We have created a hook to update the PR close-branch setting after a pull request is created. Therefore we do not see this change in the activity timeline. Would be nice to see that. For this +1

            +1000

            Savan Vadalia added a comment - +1000

            +1 Surprised this isn't available with Bitbucket Cloud! (Or at the very least make it a per-user persistable option for subsequent PRs)

            Denny Miller added a comment - +1 Surprised this isn't available with Bitbucket Cloud! (Or at the very least make it a per-user persistable option for subsequent PRs)

            +1

            Antonio Pastor added a comment - +1

            Colin Lord added a comment -

            +1

            Colin Lord added a comment - +1

            Using Flowie, a Bitbucket cloud app for defining workflows that we provide, you can configure it to always, or depending on a condition, close the source branch, so developers don't even need to worry about this.

            Flowie is available via the Atlassian Marketplace.

            Saxea _Flowie_ added a comment - Using Flowie , a Bitbucket cloud app for defining workflows that we provide, you can configure it to always, or depending on a condition, close the source branch , so developers don't even need to worry about this. Flowie is available via the Atlassian Marketplace .

            This issue has gathered enough interest to be moved automatically to Reviewing status, where it will be reviewed to someone in the relevant product development team and moved on to the appropriate status.

            Mike Howells added a comment - This issue has gathered enough interest to be moved automatically to Reviewing status, where it will be reviewed to someone in the relevant product development team and moved on to the appropriate status.

            +1

            connor.green added a comment - +1

            +1 - a massively useful feature from a housekeeping perspective

            Daniel Ambler added a comment - +1 - a massively useful feature from a housekeeping perspective

            +1 My team also needs to

            Xiaoxu Wang added a comment - +1 My team also needs to

            +1 from me

            Manal Goyal added a comment - +1 from me

            jing.li added a comment -

            +1 my team really needs this feature. 

            jing.li added a comment - +1 my team really needs this feature. 

            mjd added a comment - - edited

            Please add this feature before I migrate all my company's repos to GitHub. This should have been implemented a decade ago. Thanks.

            mjd added a comment - - edited Please add this feature before I migrate all my company's repos to GitHub. This should have been implemented a decade ago. Thanks.

            rpulliam added a comment -

            My team would love this feature – we end up with tons of old branches we have to clean up later – all because of this.  Seems like an easy win. Please implement.

            rpulliam added a comment - My team would love this feature – we end up with tons of old branches we have to clean up later – all because of this.  Seems like an easy win. Please implement.

            As cool as a Chrome extension is... it still involves me trusting my team to download it. Not sure why this isn't an easy win. The guy made an extension.

            Tyler Williams added a comment - As cool as a Chrome extension is... it still involves me trusting my team to download it. Not sure why this isn't an easy win. The guy made an extension.

            This was also a concern to our development team too, so I developed an Open-Source extension for Google Chrome, which can be installed from the Chrome Web Store.

            The extension automatically check the checkbox to delete the source branch after merging the Pull Request, and allows developers to uncheck the checkbox in special cases.

            I hope it helps!

            hectormartos added a comment - This was also a concern to our development team too, so I developed an Open-Source extension for Google Chrome, which can be installed from the Chrome Web Store . The extension automatically check the checkbox to delete the source branch after merging the Pull Request, and allows developers to uncheck the checkbox in special cases. I hope it helps!

            Pavel Teplukhin added a comment - - edited

            It was requested in https://jira.atlassian.com/browse/BCLOUD-15300 5 years ago. C'mon.

            Pavel Teplukhin added a comment - - edited It was requested in https://jira.atlassian.com/browse/BCLOUD-15300 5 years ago. C'mon.

            Rufus Shrestha added a comment - - edited

            This should be a basic feature without a doubt. Would be nice to have the default option configurable at project level settings as well as per repository settings. The former to avoid the need to edit hundreds of repositories.

            Rufus Shrestha added a comment - - edited This should be a basic feature without a doubt. Would be nice to have the default option configurable at project level settings as well as per repository settings. The former to avoid the need to edit hundreds of repositories.

            clinque added a comment -

            Would be great indeed, my team have the same behavior issue.
            Torture them had not the expected effect, they all quited! 

            clinque added a comment - Would be great indeed, my team have the same behavior issue. Torture them had not the expected effect, they all quited! 

            It must be configurable for different branches in repository settings -> branch restrictions. I wonder why this feature is still not implemented....

            Daria Banenkova added a comment - It must be configurable for different branches in repository settings -> branch restrictions. I wonder why this feature is still not implemented....

            +1 very useful feature. a must have feature for us as we are starting to use monorepo.

            Sucharitha Chapparam added a comment - +1 very useful feature. a must have feature for us as we are starting to use monorepo.

            EugeneR added a comment -

            1+ coming from other tools, the fact that this one is missing feels very odd. 

            EugeneR added a comment - 1+ coming from other tools, the fact that this one is missing feels very odd. 

            A must-have feature.

            Vladislav Ermolin added a comment - A must-have feature.

            Looks like a very nice and useful improvement!

            Stepan Churyukanov added a comment - Looks like a very nice and useful improvement!

            +1 same thing! please add that to nearest possible sprint  

            Aleksei Krugliak added a comment - +1 same thing! please add that to nearest possible sprint  

            +1 This is a very important feature in the cloud version

            vladislav.tikhonov added a comment - +1 This is a very important feature in the cloud version

            We were sold cloud version as being better and more up to date than server; but fixed on server, not on cloud?

            Charles Bowman added a comment - We were sold cloud version as being better and more up to date than server; but fixed on server, not on cloud?

            +1 This is seriously a big deal for as simple a feature that it would be. We are evaluating other CI/CD tools and may not go with Bitbucket because of this.

            michael.west added a comment - +1 This is seriously a big deal for as simple a feature that it would be. We are evaluating other CI/CD tools and may not go with Bitbucket because of this.

            +1, it will be great to have rules/regex to which branches it should apply. In our case we would want it enabled to all source branches except master, develop and release/* branches

            anton.pozhidaev added a comment - +1, it will be great to have rules/regex to which branches it should apply. In our case we would want it enabled to all source branches except master, develop and release/* branches

            +1, Please prioritize the issue Bitbucket team, this is causing us to re-look at our association with Bitbucket as an enterprise client.

            Rama annaswamy added a comment - +1, Please prioritize the issue Bitbucket team, this is causing us to re-look at our association with Bitbucket as an enterprise client.

            This is critical for teams with large repos. Even if we can't do it globally and have to enable it per-repo, it still would be very useful at the repo level, just like Bitbucket server.

            Use case - current repo I'm dealing with has over 1,000 branches created over the last two years. Having too many branches causes the branch filters on the create pull request screen to hang and the page to respond very slowly. Atlassian SourceTree cannot pull changes on a given branch, because the list of branches is too big. SourceTree crashes. Other platforms, like VisualStudio AppCenter have problems integrating with excessive numbers of branches.

            Even with a periodic cleanup every few months (a tedious manual process), the branch count grows again very quickly because developers don't remember to enable the checkbox. This is a critical feature from Server that does not exist in Cloud.

             

            Anthony McLin added a comment - This is critical for teams with large repos. Even if we can't do it globally and have to enable it per-repo, it still would be very useful at the repo level, just like Bitbucket server. Use case - current repo I'm dealing with has over 1,000 branches created over the last two years. Having too many branches causes the branch filters on the create pull request screen to hang and the page to respond very slowly. Atlassian SourceTree cannot pull changes on a given branch, because the list of branches is too big. SourceTree crashes. Other platforms, like VisualStudio AppCenter have problems integrating with excessive numbers of branches. Even with a periodic cleanup every few months (a tedious manual process), the branch count grows again very quickly because developers don't remember to enable the checkbox. This is a critical feature from Server that does not exist in Cloud.  

            +1 Especially because this appears to be a feature in Bitbucket Server: BSERV-9254 Allow "Delete source branch after merging" to be enabled by default - Create and track feature requests for Atlassian products.

            I'd love for this to be enforceable on an org-wide scale. My org uses hundreds of repos, so it would save so much time to be able to have 1 checkbox to enforce auto branch deletion for all the PRs in every repo.

            christian.campanaemard added a comment - +1 Especially because this appears to be a feature in Bitbucket Server: BSERV-9254 Allow "Delete source branch after merging" to be enabled by default - Create and track feature requests for Atlassian products. I'd love for this to be enforceable on an org-wide scale. My org uses hundreds of repos, so it would save so much time to be able to have 1 checkbox to enforce auto branch deletion for all the PRs in every repo.

              dparrish Dave Parrish [Atlassian]
              13244c4e0671 Matthias Maier
              Votes:
              294 Vote for this issue
              Watchers:
              113 Start watching this issue

                Created:
                Updated: