# How to block PR merge on Bitbucket Cloud only if quality gate fails and accept other job failure?

**URL:** <https://community.sonarsource.com/t/how-to-block-pr-merge-on-bitbucket-cloud-only-if-quality-gate-fails-and-accept-other-job-failure/76312>\
**Category:** SonarQube Server / Community Build\
**Tags:** bitbucketcloud, sonarqube\
**Created:** [November 18, 2022, 8:43pm UTC](https://community.sonarsource.com/t/how-to-block-pr-merge-on-bitbucket-cloud-only-if-quality-gate-fails-and-accept-other-job-failure/76312 "2022-11-18T20:43:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kemil-sakhareliya](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/kemil-sakhareliya/32/39300_2.png) [@kemil-sakhareliya](https://community.sonarsource.com/u/kemil-sakhareliya)\
**Post date:** [November 18, 2022, 8:43pm UTC](https://community.sonarsource.com/t/how-to-block-pr-merge-on-bitbucket-cloud-only-if-quality-gate-fails-and-accept-other-job-failure/76312/1 "2022-11-18T20:43:41Z")

</div>

Must-share information (formatted with [Markdown](https://commonmark.org/help/)):

- which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)

SonarQube Developer edition  
Version: 9.7.1.62043

we use azure devops pipelines for build and bitbucket cloud for SCM

- what are you trying to achieve

I have setup merge restriction on bitbucket cloud repository that prevents a merge if build is in process or if it fails following the topic below and as we do not have code insight feature with bitbucket cloud.

> [@How to block your PR merge in SonarCloud or SonarQube with BitBucket Cloud](https://community.sonarsource.com/t/how-to-block-your-pr-merge-in-sonarcloud-or-sonarqube-with-bitbucket-cloud/21195):
>
> Hi there, It’s possible to [prevent merge of PR in BitbucketCloud](https://confluence.atlassian.com/bitbucket/suggest-or-require-checks-before-a-merge-856691474.html) when the Quality Gate of SonarQube (8.7 or higher) or SonarCloud is failed. To do that you need: [To have imported a BitBucketCloud repository into SonarCloud](https://sonarcloud.io/documentation/integrations/bitbucketcloud/) or in SonarQube 8.7+ Configured a CI to launch analysis on PR. A Premium plan on the BitbucketCloud team Once you have that, you can configure the branching permission of your repository in BitbucketCloud by adding a check on successful builds and no failed builds and c…

![image](https://europe1.discourse-cdn.com/sonarsource/uploads/sonarcommunity/original/3X/0/6/06a099b05e436e17ea0633cfc7866f09a6391c01.png)

the thing is I have some other tasks inside my PR pipeline jobs such as trivy scan and npm audits which is fine if fails. but because of the merge check on the build, pipeline fails and I cannot accept merge even if quality gate passes.

- what have you tried so far to achieve this  
No options found for now.

---

<div class="post-metadata">

**Author:** ![Colin](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/colin/32/55255_2.png) [@Colin](https://community.sonarsource.com/u/Colin)\
**Post date:** [November 21, 2022, 5:06pm UTC](https://community.sonarsource.com/t/how-to-block-pr-merge-on-bitbucket-cloud-only-if-quality-gate-fails-and-accept-other-job-failure/76312/3 "2022-11-21T17:06:51Z")

</div>

Hey there.

As far as I’m aware – it’s all or nothing with Bitbucket Cloud when it comes to merge checks. 😕 You might want to raise a feature request on their side to allow you to only make certain checks required, and others only recommended.
