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?
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
Bitbucket built-in merge check do not allow zero as an entry, minimum is one.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I don’t see such settings.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
OK - I wonder why Atlassian has this restriction! I will check with Atlassian and let you know.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Could you please show how can I use it in scriptRunner code
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you please confirm if you are using Bitbucket Cloud or Bitbucket DC?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Bitbucket cloud
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It’s not work for me. I don’t have rights to add Flowie. I
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.