mc1arke / sonarqube-community-branch-plugin

A plugin that allows branch analysis and pull request decoration in the Community version of Sonarqube

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bitbucket integration non compliant to the documentation

ahermes opened this issue · comments

Describe the bug
I upgraded my old SonarQube to the 9.9 LTA and my quality report keys has changed from com.github.mc1arke.sonarqube to the SonarQube project key of my maven project.

With the update from the plugin version 1.8.1 to 1.11.0, the static report key was changed to the project key which is not what is stated in the sonarqube documentation : Bitbucket Integration
=> Add a Required report called com.sonarsource.sonarqube

To Reproduce
Steps to reproduce the behavior:

  1. With SonarQube 9.9 LTA
  2. Follow the documentation on a bitbucket project
  3. Start mvn sonar:sonar command with -Dsonar.pullrequest.key, -Dsonar.pullrequest.branch and -Dsonar.pullrequest.base
  4. See on the PR that "The associated report with the key 'com.sonarsource.sonarqube' was not created"

Expected behavior
The report associated with the PR analysis is expected to be com.sonarsource.sonarqube

Screenshots
quality_report

Software Versions

  • SonarQube Version: [v9.9.6 (build 92038)]
  • Plugin Version: [1.14.0]

I don't see this issue with Plugin version 1.19.0 and SonarQube 10.4 . Looks like it is fixed in later versions of plugin.

This was an intentional choice in #578, however I wonder if it should be altered to use the static project key for non-mono-repos, and only use a dynamic key when in a mono-repo, given the documentation states Preventing pull request merges when the quality gate fails is not supported for monorepos., so Sonarqube presumably does something similar in its implementation.