Branches and Pull Requests not working as expected

We’re evaluating the Developer edition ( and I am running into an issue with the ‘Branches and Pull Requests’ feature.

Right now it’s configured to use Bitbucket server (default ports). The project itself is also configured and has its key and slug configured. SonarQube does not seem to connect to the server to analyze all branches and pull requests.

I’ve made an initial push of data to SonarQube and that works just fine.

SonarScanner.MSBuild.exe begin /k:“project-key” /“sonar-server-url” /d:sonar.login=“my-login-key” /“bw_output”
build-wrapper-win-x86-64.exe --out-dir bw_output MSBuild.exe /t:Rebuild
SonarScanner.MSBuild.exe end /d:sonar.login=“my-login-key”

However, since I configured the Bitbucket configuration I am expecting that SonarQube is pulling data from Bitbucket as seen at : How to achive Branch analysis different for master and its branches but it doesn’t display anything.
Reviewing sonar-server-url/documentation/branches/overview/ does not make it very clear to me either.


  • Is SonarQube not doing any pulling automatically? If not, why do I have to enter my repository details?
  • Is it expected that all developers after creating a branch, update their SonarQube batch to include:

SonarScanner.MSBuild.exe begin /k:“project-key” /“sonar-server-url” /d:sonar.login=“my-login-key” /“bw_output” /“feature/branch/name”
build-wrapper-win-x86-64.exe --out-dir bw_output MSBuild.exe /t:Rebuild
SonarScanner.MSBuild.exe end /d:sonar.login=“my-login-key”

If I specify the target, I can see that SonarQube has added the branch in the pulldown options. But is that how this is supposed to work?
The master branch has pull requests, why do they not show up?

ps: would be nice to see that Gitlab support soon.
pps: project-key, my-login-key and sonar-server-url do have the correct values set.


Welcome to the community!

No, SonarQube doesn’t pull anything. Instead, you’ll update your builds to run analysis (which pushes to SonarQube).

Those details allow SonarQube to reach back to the repo after a PR analysis to decorate the PR with the analysis result

Not exactly. It’s expected that someone will update the build to

  1. run analysis
  2. recognize from the environment when it’s a branch/PR, and add the appropriate values (from the env) to perform a non-master analysis.