Sonarqube - BitBucket - Pull Request Blocker

Hi,

I’m testing the pull request functionality, but my pull request is not blocked by the Quality Gate.
I followed Pull Request analysis.

But I see the following in Bitbucket docs: https://developer.atlassian.com/server/bitbucket/how-tos/code-insights/

A failed report will not block the merge
Posting a failed report will not stop a pull request from being merged. There are build status settings that can be set up for a repository or project that will block the merge so it is recommended to also post a failed build status if wanting a report to affect the mergability of a pull request.

What should I do to block the merge?

Version: 7.7.0.23042
BitBucket: v5.15.1

1 Like

Hi,

Thanks for this report. We’re discussing it internally. Hopefully something tangible will come of it “soon”.

 
:slight_smile:
Ann

Is there any update about this functionality? I am having the same issue (pull request not blocked). I see a post online (https://community.atlassian.com/t5/Bitbucket-questions/Sonar-Quality-gate-preventing-PR-Merge/qaq-p/975937) which indicates that this functionality is available but I can’t figure out how to enable it.

Thanks,
Mike

Atlassian has released BitBucket Server 6.9, as of December 10th, which now can block merges based on code quality insights, https://confluence.atlassian.com/bitbucketserver/bitbucket-server-6-9-release-notes-980462706.html.

See SonarQube announcement: How to block your PR merge in SonarQube with BitBucket Server

2 Likes

That’s great. Thanks. We’ll give it a try.