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

Must-share information (formatted with Markdown):

  • 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.

image

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.

Hey there.

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