Pull Request Analysis for Bitbucket Cloud

Hi,

I am trying to configure pull request analysis on SonarCloud. Our SCM provider is Bitbucket Cloud. I have set the “sonar.pullrequest.provider” in the Administration → General Settings → Pull Requests to “BitbucketCloud”:

Yet, when I open a Pull Request in Bitbucket, I still see this:

What am I doing wrong? Thank you.

Hey there.

Bitbucket Cloud does not support Automatic Analysis – meaning there’s some configuration you need to do before you start seeing things analyzed.

  • Please reset the value you configured for Pull Request Provider
  • Follow the instructions in the UI, and make sure your pipeline runs on each pull request

The documentation on Getting started with Bitbucket Cloud is always helpful.

That assumes you are using Bitbucket pipelines right? I am using Bitbucket Cloud and TeamCity for our CICD process. Also, I have setup the analysis for our branches, which is working correctly through TeamCity, however, just this final hurdle of getting the Pull Request Analysis to work.

1 Like

Bump?

1 Like

Hey there.

This is a community forum – please don’t bump threads (and certainly not less than a day later).

If you are using TeamCity, keeping in mind they do have a homegrown SonarQube integration that may work for SonarCloud (I haven’t tested it though), you will need to pass the sonar.pullrequest.* parameters whenever a Pull Request is being raised (using environment variables that are available in your build environment). Those sonar.pullrequest.* parameters are define here

You’ll find similar advice for another CI (buildkite) here: