SonarCloud successfully processes analysis, receives code coverage but does not post comments to GitHub PR (private repo)

Template for a good new topic, formatted with Markdown:

  • ALM used GitHub
  • CI system used GitHub Actions
  • Scanner command used when applicable (private details masked)
  • Languages of the repository. C# / dotnet
  • Error observed (wrap logs/code around with triple quotes ``` for proper formatting)
  • open a pr, sonarcloud kicks off, successfully completes, metrics are available on sonarcloud, but nothing is posted back to github. (pr decoration is not working)

I was also in General Settings > Pull Requests and under GitHub I see:

## Integration with GitHub

You may need to specify additional parameters to enable pull request analysis. See the documentation for more information.

I went to the docs; but I don’t really see anything specifcally called out in getting this to work? I’ve seen some posts that require a GitHub App, I see others that don’t mention it. How is this to be done?

@jxberrios jxberrios

We are able to see metrics on branches, but no comments are posted back to github; also it’s not picking up changes to our default branch.

I’ve also noticed that in our sonar cloud settings it doesn’t seem to pick up that our org is linked to the account.

Hello @mightymiracleman,

Welcome to the community!

Can you tell me if you organization is bound to GitHub? You can tell this be looking at your org name
It should have the GitHub icon next to the name (it should not be greyed out). If the icon is grey you can bind it manually by going to Administration → Organization Settings. You should see the button:

The organization binding is required in order to receive checks and summary comments in GitHub.


Thanks @Marcin_Majewski. Not sure why but ours is greyed out. We will try to get it bound. Once that is done, Sonarcloud cloud should post into the PRs, correct?

Hi @jxberrios,

Once your organization is bound, it is possible to have the Github decoration.
The decoration will work in the following situations:

  • Your repository is bound to GitHub, it was imported using the “+” symbol and selected from your organization on GitHub. This is not your case as you had the organization unbound and created projects manually.
  • You pass the sonar.pullrequest.github.repository (equal to the SLUG of repo, example of SLUG: facebook/react) and sonar.pullrequest.provider = GitHub as the parameters to the scanner