Here's the scenario:
Dev A branches from develop and creates branch "feature/abc-123". Dev A then pushes a commit to their feature branch and creates a Pull Request to merge "feature/abc-123" back into the develop branch.
While that first PR is in review, Dev B branches from develop and creates branch "bugfix/abc-456". Dev B fixes the issue quickly, pushes a commit, creates a PR.
The team reviews the PR for the bugfix first, since it is higher priority. The PR for "bugfix/abc-456" gets approved and merged into the develop branch.
The first PR from Dev A is now stale. That is, the branch "feature/abc-123" no longer has all of the latest updates from the develop branch. The workflow process for my team would *require* Dev A to merge develop into feature/abc-123 before the PR can be approved. Is there a Bitbucket workflow or merge check that will notify the user in the PR that the source branch is NOT up-to-date?
If not, this becomes a manual process of checking that the source branch is up to date before clicking Merge on any PR.
And yes, we have a Premium account, so we are able to configure merge checks to be required before the Merge button can be used.
Here's an attempt at illustrating the desired process:
develop ==> feature/abc-123 (branched)
develop ==> bugfix/abc-456 (branched)
feature/abc-123 ==> develop (PR merged)
bugfix/abc-456 XXXX> develop (merge attempt is blocked)
develop ==> bugfix/abc456 (merged)
bugfix/abc-456 ==> develop (PR merged)
Thanks in advance!
Bitbucket Server: both of our paid add-ons can enforce this: Control Freak for Bitbucket Server, and Bit-Booster - Rebase Squash Amend.
In Control Freak the setting is called "Require Fast-Forwardable Merges" (via settings --> control freak).
In Bit-Booster the merge-check is called: "Bit-Booster Require Fast-Forwards"
Note: Control Freak allows global, per-project, per-repo configuration, with support for exemptions, whereas Bit-Booster only allows per-repo configuration. Both apps default to "off" for this merge and push check.
Bitbucket Cloud (a.k.a. bitbucket.org): I don't think such a check is possible at this time.
Okay. I am looking for a solution in Bitbucket Cloud, so it seems that we'll need to apply this as a manual check for now.
Thanks for the quick response!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Michael J Smith Hello.
I am looking for the same answer and as you replied almost half a year ago I am wondering did you find some workaround for your case? Thank you for any help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No, unfortunately this request is still unfulfilled in Bitbucket Cloud. My team has added a manual (human) process to merge master into the branch and wait for a successful build result before merging any PR. This is part of what we do for each PR and there isn’t anything in the system to enforce it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for your prompt answer. I hope it will be implemented soon as part of 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 must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.