Conclusions after merge

Vladislava Soboleva
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 26, 2025

Hello! We have a couple questions about merge. There are branches for which PRs are created and a style check build is run on each. But as soon as this PR is merged, a collision sometimes occurs and the style check build in the master fails (since the branch before the merge is not updated to the master). Could you tell me please, is it possible to denied merging PRs until the branch is updated to the master? Maybe there are some other ways to avoid such errors?

2 answers

2 votes
Ulrich Kuhnhardt _IzymesCo_
Atlassian Partner
January 27, 2025

In your Bitbucket repository (Merge) settings you can configure a merge-check where you can specify how many commits your PR source branch can be behind master, which would be  zero for your use case. Bitbucket will then block merging this PR (if you have a Bitbucket cloud premium subscription) or at least show a warning on the PR page.

Hope this helps!

Best, Ulrich

Saxea _Flowie_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 27, 2025

Bitbucket built-in merge check do not allow zero as an entry, minimum is one.

Screenshot From 2025-01-28 12-26-58.png

Vladislava Soboleva
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 28, 2025

I don’t see such settings. 

Ulrich Kuhnhardt _IzymesCo_
Atlassian Partner
January 28, 2025

OK - I wonder why Atlassian has this restriction! I will check with Atlassian and let you know.

2 votes
Saxea _Flowie_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 27, 2025

Hi @Vladislava Soboleva ,

If you are using Bitbucket cloud, Flowie, our Bitbucket app, provides a check that allows you to enforce that the PR is updated to the master before merging. 

You can specify maximumCommitsBehind as zero, and it will only allow the PR to be merged once it is synced. You can also to sync it automatically for you, so PR is always ready to be merged, without requiring the author to have to monitor the PR.

There is an open Jira for this request.

Vladislava Soboleva
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 28, 2025

Could you please show how can I use it in scriptRunner code

Saxea _Flowie_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 28, 2025

Can you please confirm if you are using Bitbucket Cloud or Bitbucket DC?

Vladislava Soboleva
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 28, 2025

Bitbucket cloud 

Saxea _Flowie_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 28, 2025

You can follow the steps in the Getting Started in order to try Flowie. If you need further assistance, you can contact our support at support@flowie.app.

Vladislava Soboleva
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 28, 2025

It’s not work for me. I don’t have rights to add Flowie. I

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events