From Automatic analysis to CI based analysis no longer updating PR/Branch view in Sonarcloud

Hey folks,

  • ALM: Github
  • CI system: Buildkite
  • Scanner command:
sonar-scanner -Dsonar.organization=XX -Dsonar.projectKey=XX -Dsonar.login= -Dsonar.projectVersion=2074_2233
  • Lanaguages of the repo: Javascript

Sonar properties:


Problem: So I recently migrated our pipelines from the automatic analysis to the ci-based analysis ( ie running within our pipeline ). While doing so I’ve noticed that the list of PRs and Branches is no longer correct.

There are 5 PRs open on Github and around 7 Branches currently open but Sonarcloud is showing 10 PRs and 14 branches.


Its showing a number of branches and PRs that have been deleted/closed and not showing new PRs raised but it is showing new created branches that are scanned.

I figure the old ones might hang around for a predefined period after being deleted but I’m not sure why the PRs aren’t updating to include newly raised ones especially when analysis is ran and uploaded successfully?

In addition, the coverage view on the latest branch build doesn’t match the overview ( which I believe is accurate )… any idea why that might be? It almost seems like its only generating output from that commit not the whole/branch PR. If the PR integration was working correctly I’m guessing it might work as intended

From the overview page:

Clicking in the branch :

I might have figured it out… I suspect because we’re using a peculiar CI system ( ala Buildkite ) we’ll need to follow the steps for “Other CI” here and push up a few additional parameters on PR runs: Pull Request Analysis | SonarQube Docs

1 Like