mc1arke / sonarqube-community-branch-plugin

A plugin that allows branch analysis and pull request decoration in the Community version of Sonarqube
GNU Lesser General Public License v3.0
2.18k stars 513 forks source link

Bitbucket integration non compliant to the documentation #934

Closed ahermes closed 6 days ago

ahermes commented 1 month ago

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

ummarbhutta commented 1 month ago

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.

mc1arke commented 1 month ago

This was an intentional choice in https://github.com/mc1arke/sonarqube-community-branch-plugin/pull/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.