pull request and bu

we would like to have the following mechanism for PR


1) create a PR

2) send to review

3) approved to be merged

4) pre -merged - triggers a CI build

5) if CI fails- the merge is declined. 


how do I connect the CI status with the PR in hand ? 

1 answer

Hey Gabby.

It's possible to set Merge Checks in Bitbucket to prevent a merge from happening.

Bitbucket Bitbucket has the following default merge checks:

  • All reviewers approve - requires all reviewers to approve a pull request before merging.
  • Minimum approvals - requires at least the specified number of approvals before merging.
  • Minimum successful builds - requires at least the specified number of successful builds before merging.
  • No incomplete tasks - requires all tasks to be complete before merging.

Besides that you can also create your own merge check plugin if you need to adapt it to your workflow.

You can see all and even more information on the article below


Hope that helps.

Douglas Gnoato

Thanks Douglas,

I am just making I was understood. I would like to have sort of a pre merge hook which will trigger the build.if build had passed, it will allow the PR to be merged.otherwise, it will deny

So the PR is pending until the build ends.

Suggest an answer

Log in or Join to answer
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

714 views 0 4
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot