-
Suggestion
-
Resolution: Unresolved
-
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.
Moved from: https://jira.atlassian.com/browse/BSERV-10344
Latest update from Atlassian 2024-10-04
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.
- relates to
-
BCLOUD-21280 Provide ability to set default value for Delete on Merge at repo level
- In Progress
-
BCLOUD-21661 Set "delete source branch" as default for all pull-requests
- In Progress
- mentioned in
-
Page Failed to load
-
Page Failed to load
-
Page Failed to load
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
Form Name |
---|
[BCLOUD-15300] Option to check the `close branch after a PR is merged` checkbox by default
Hi all đ Well I know it's been a long time coming, so I'm happy to say that 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.
All comments
dparrish - I'll second Basin's comment - We've been patiently waiting and MANY in my org would REALLY like this feature to get across the finish line.
dparrish Just checking on the status as the last update was 5 months ago. Is there an ETA on when this feature would be available?
Hi all đ Well I know it's been a long time coming, so I'm happy to say that 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.
9a412cca67c5 I am not sure anymore if this is just a bummer, if not a disgrace. This item was created 7 years ago. It was already implemented in Bitbucket Server. They moved us to cloud (as they discontinued a Server).
One would expect that most basic functionality would be eventually moved to the cloud. Especially those that are very highly rated and technical simple (at least should be) as this one.
An explanation from Atlassian product management would be appreciated, what are their thoughts on all this.
Pleaaase... just migrating to Bitbucket from GitLab. And this basic feature missing is a real bummer.
Github and Gitlab have both supported this feature/configuration since 2019
dparrish - Could you please review this request and either assign to someone to work on it or provide us end customers some type of update on when we might expect someone to work on it? This capability is already enabled in Bitbucket Server as I understand it... Having the option to set default behaviour to close/delete a branch on a PR merge would be VERY helpful. Thanks.
Imagine taking 6+ years to implement a function that is already available in Server version of Bitbucket
> We were also on prem BitBucket user and were pushed to the cloud with EOLS of on prem BB.
Then you might not know that this was actually removed â we were always using the cloud instance and this feature was present in the past.
> Especially as this would be so helpful for many of us
But will our companies switch to another product due to this, or other things us simpleton programmers need?
@2bbe1d3a083c exactly! Especially as this would be so helpful for many of us (instead we need now purge open branches on our own)! Additionally, this looks like as a nice task for a junior dev. I do not get it.
We were also on prem BitBucket user and were pushed to the cloud with EOLS of on prem BB.
How can you force people to go on Cloud but being 5 years late on basic features...
How is this still not implemented given this was raised in 2017! Please, Please, Please implement this I beg you
+1 On this, it's a huge pain point. It would be awesome to have this a configurable default option. Preferably on the Project level so it can inherit down to the repositories inside of a Project.
Note: It looks like now the language is "Delete (branchname) after the pull request is merged", but the concept is the same.
Not sure why this is not implemented yet but this keeps the branches and the dev to behave.
I have some repos that contains a good amount of branches and if you go any of those repos branch page it just crashes so that is beneficial to your servers and workload. Only by that cost savings and load on your servers, you should have implemented it by now.
+1 - this would improve our experience - developers often skip or miss the checkbox on merge. The use case for keep branch alive is so edge in our dev strategy, that it almost never happens. The option to control this setting would improve our software experience.
+1 This would've prevented our branches becoming a huge mess.
This came up for discussion during our full-team retrospective today. Not being able to have this checkbox checked by default, and only unchecked in the rare cases (probably 2% of the time or less) where we want the branch to continue "living" after the PR for that branch is merged, has pretty big effects on our team.
It may seem like a small thing, to tell everyone on the team "hey, always remember to check this checkbox when you create a PR!" And by itself, it is a small thing.
But that's just one feature (of many) of one tool (of many) that we use. Across all the features of all the tools we use, the total effect of all the "hey, remember to do X in tool Y when you are doing Z" things we have to carry around in our heads as workarounds for default behavior that we'd like to happen almost all of the time adds up to a lot of complexity and a lot of opportunities for error.
As of this comment, this issue has 290 upvotes, and has been an idea around for over 6 years. And it is getting actively, recently commented on and upvoted.
And it's already in Bitbucket Server but not Bitbucket Cloud.
Maybe implementing it is more complicated than it seems from the outside (I know that there are things in the product we work on that are sometimes like that). But I hope the Bitbucket Cloud team will consider this improvement soon.
Flowie, our add-on for Bitbucket Cloud, supports this. In addition to setting the default as 'close', you can also enforce the option, even based on specific conditions, e.g., destination branch, so you can implement a workflow without relying on the user.
It also supports labels, enforced merge strategies, PR size, and much more!
+1
something done in server, but not in cloud. that's a very sad story.
I would like to note that it could be good if you can configure exceptions for some branches(e.g. in GitFlow - release or hotfix branches should not be deleted right after merge to master because they also have to be merged back to develop branch)
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.
This would really come handy, so we feature/bugfix branches don't pile up.
+1 đđŒ to make this happen
Come on Atlassian, Bitbucket server already has this option (https://devops.stackexchange.com/a/15061)
I have moved my 70+ User company to another platform good bye bitbucket
Can we please prioritize this. we had to create a job to clean up these unused branches.
We're currently using this strategy to periodically hose-down the repository and close off merged branches:
# Best run on a new clone, using master branch. git clone <project> . # Fetch all branches to delete git branch -r --merged | egrep -v "(^\*|master|my_excluded_branch)" | sed 's/origin\///' > branches.txt # Delete all branches in the remote, from branches.txt cat branches.txt | xargs -n 1 git push origin --delete
Use with caution - the interim branches.txt step allows you to review the chaos before you destroy your life's work.
Why BB Cloud should be different and lag behind for common and much needed common routine systematic cleanup than BB Server offering where https://jira.atlassian.com/browse/BSERV-9254 was done a year+ ago?
Can the product owner answer rationals behind the delay and timeline for resolution?
We do not currently have an update on this feature request though we realize this has been open for a while. In the past quarters the team has been focused on releasing UI enhancements to the review experience itself (e.g. Tabbed sidebars, the Request Changes workflow, and ensuring the the product is secure). Going forwards, we will continue to add improvements to the PR screen, and when we have an update on this feature, we will update this ticket.
Why is a change like this such a big deal? Is the code in such bad condition?
Honestly, How hard could this be ?
- Add a setting
- check the setting and enforce it
Give me read access to your repo I will do it for you and send you a PR (which closes the branch if merged )
I think this item should be ranked higher in priority.
I just finished working with support and they added BCLOUD-20783. In many cases, the 'close branch after PR is merged' box WAS already being checked (what this ticket suggests).
Around Christmas 2020 some change was introduced that made that behavior happen less often.
I suspect a lot of users were seeing and enjoying that behavior. By fixing BCLOUD-20783, you are likely to cause a large number of customers to be annoyed by the new behavior. Implementing the suggestion outlined here would go a long way toward heading that off.
For anyone that does not want to wait, I created a userscript that you can install into the GreaseMonkey or TamperMonkey addons in Firefox and Chromium based browsers. If you already have the addon installed, go to https://greasyfork.org/en/scripts/492710-bitbucket-cloud-helper-functions to install or view the source on my GitHub