How do you set the default merge strategy?

Mike Blandford February 2, 2017

https://confluence.atlassian.com/bitbucketserver/pull-request-merge-strategies-844499235.html

To configure merge strategies for a repository
:

  1. In repository settings, select Pull requests.


If I go to my settings page, https://bitbucket.org/{repo}/admin


I do not see a Pull Requests section. I do see a Pull Requests section under navigation, but that just lists open pull requests.

5 answers

2 accepted

2 votes
Answer accepted
Alastair Wilkes
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 27, 2018

This feature is now available in Bitbucket Cloud. Read more about it here: https://bitbucket.org/blog/fast-forward-merges-bitbucket-cloud-default-like

Peter Majeed May 31, 2019

@Alastair Wilkes is there a way to set this programmatically via the API? I only see documentation for Bitbucket Server @ https://confluence.atlassian.com/bitbucketserverkb/how-to-define-a-default-merge-strategy-per-project-894207103.html.

Alastair Wilkes
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 31, 2019

@Peter Majeedthanks for your question. At this time, there isn't an API to set this programmatically.

John Gill June 3, 2019

Why even release a feature if you can't do it in both places. We are hacking all over the place hitting cloud endpoints that aren't documented, but totally exist because the app uses them. Why not just document and allow users to have all the wonderful power. Right now we feel hamstrung, or hacky. Either way, this does not give me confidence in Atlassian product quality. Especially when there are solutions like Github getting more and more powerful every day! 

TL:DR
Release a feature with an API used by the GUI, document that API and give it to the people. Anything less is disappointing at best. 

Like # people like this
Alastair Wilkes
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 4, 2019

Thanks for the feedback, John. While we've recently made considerable improvements to the 2.0 APIs, we still have a ways to go -- especially when it comes to repository configuration management.

Michel Zanini June 5, 2019

Hi @Alastair Wilkes ,

Is there any way I can set a default merge strategy to squash for all repositories belonging to a team on Bitbucket Cloud?

I need to define this globally for all repositories not one by one individually.

Or, do that it could be individually per repository if there was an API for it.

We need to do this for our CI/CD process.

Thanks.

Like # people like this
Alastair Wilkes
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 5, 2019

Hi @Michel Zanini,

Thanks for your question. At this time, there isn't an easy way to do that; you'll need to set it one-by-one, in the UI. This is obviously suboptimal, and we need to make this easier in the future.

Thanks,

Alastair

Neville Stokes May 29, 2020

Any progress on this?

Peter Majeed July 9, 2020

FWIW, there is an issue tracked for this @ https://jira.atlassian.com/browse/BCLOUD-16387. Please vote for it. (There is one quasi-workaround at the moment.)

Peter Majeed January 5, 2021

FWIW, we are planning on canceling our subscription with Bitbucket and moving to another provider because of the lack of customizations like this that damages the developer experience.

2 votes
Answer accepted
jredmond
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 2, 2017

You're looking at documentation for the self-hosted version of Bitbucket (known as Bitbucket Server). At the moment, there's no option for a default merge strategy in Bitbucket Cloud (bitbucket.org).

Have a look at https://confluence.atlassian.com/bitbucket/work-with-pull-requests-223220593.html#Workwithpullrequests-Mergestrategies for the right set of documentation.

11 votes
Alastair Wilkes
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 2, 2017

Hi Mike,

That documentation is for Bitbucket Server, which supports the default merge strategy feature.

Bitbucket Cloud is a separate product with a slightly different featureset. A default merge strategy is not yet available, but since we just released squash-on-merge, it's something we want to add to cloud soon.

Alastair

Carl Nordenfelt April 27, 2017

Hi Alastair,

Any news on this topic? We always squash our branches when merging but developer dicipline is hard to obtain unless enforced so this feature would be much appreciated :)

Kristin Jones June 15, 2017

Desperate for this. +1

glrdadmin July 10, 2017

Please implement.  This is a great feature to have.

 

+1!

Dan Baggott August 17, 2017

+1  Is there a ticket tracking this feature request? 

Alastair Wilkes
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 17, 2017
Dan Baggott August 17, 2017

Thank you!

John Gill March 15, 2018

Over a year later and no options yet? But hey Stride is out... oh wait we all use Slack. 

Please Atlassian, stop trying to expand and just make your products work... this should be a CORE feature of Bitbucket, not an idea that still isn't implemented after a year.

+1 to get this done.  

Matt Mikitka March 27, 2018

+1

Christopher Olekas March 27, 2018

+1

Ryan Collier March 27, 2018

+1

Yohan GREMBER September 27, 2018

+1

Alastair Wilkes
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 27, 2018

@Yohan GREMBERthis feature actually shipped a little while ago! You can read it about it here: https://bitbucket.org/blog/fast-forward-merges-bitbucket-cloud-default-like

Like Yohan GREMBER likes this
0 votes
Vincent Grace May 5, 2018

+1

0 votes
Justin LaVelle March 21, 2018

+1

Please add this feature. This is such a minor setting to allow, just do it. We shouldn't need browser extensions to get simple functionality like this.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events