Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,367,197
Community Members
 
Community Events
168
Community Groups

From Simple to Advanced – Boolean Merge-Check Expressions for Bitbucket

No doubt: pull request merge-checks are a God-sent for larger teams that require a thorough pull request review process. At the end of the process, only when all conditions are fulfilled, the pull request can be merged.

However the process and merge-check requirement can become too rigid and actually slow down the process – one reviewer is on leave, and another one is working in a different timezone and is already enjoying their weekend. You wind up chasing reviewers for their approval so the pull request can be merged.

Think of pull request merge-checks as a long checklist, all items end up as an AND condition.

Enterprise-sized teams need a balance of sufficient control and enough flexibility when it comes to approving and merging pull requests.

How about flexible, nested boolean merge-check expressions? A tree of decisions you would make in real life anyway when navigating changing circumstances?

The pull request will be automatically merged if:

  • more than 2 digital signatures and more than 1 successful build and 50% or more of reviewers have approved, OR
  • more than 2 digital signatures and more than 1 successful build and 2 or more members per reviewer group have approved.

Here’s another merge-check condition that responds to recent events

(requiredBuildsCount > 0 & groupQuota >=2) | groupQuota['royal-family-members'] > 0


So now if push comes to shove and the delivery deadline is approaching fast, just have a member of the Royal Family approve and the pull request is merged instantly, no builds, no other approvals! That’s what we call being flexible.

Try Workzone for free...

Happy coding!

Sean Manwarring

Head of Marketing at Izymes


Izymes’ mission is to eliminate boring from work. We build apps that turbo-charge team velocity through contextual automation.

Tweet to @izymesco

0 comments

Comment

Log in or Sign up to comment
TAGS

Atlassian Community Events