Missing PR comments on private Github repo

We are using SonarCloud on private Github repositories, and are experiencing the following issue with PR integration:

  • Our CI pipeline (Jenkins) builds our Maven project, and runs the ‘mvn sonar:sonar’ command initializing the project on SonarCloud, if it has not been setup earlier
  • In the case where the project has not been initialized earlier, we never get the SonarCloud comments on the PR with the analysis results.
  • If we delete the project from SonarCloud, and then initialize it from the list of Github repos on SonarCloud, then we get the comments on the PR, once the PR

Is this expected behaviour, when the repo is not initialized from SonarCloud.io, or perhaps a bug? It introduces a annoying manual step, that we would be happy to avoid.

I am not sure if this is related to this issue in any way: GitHub lost the sonar Check. It could be coincidence that deleting and re-initializing a repository solves the issue.

If you need more details, I can provide this in a PM.

Thank you

Hello @gringostar,

Thanks for reporting this, this is currently expected behaviour. To perform PR decoration we need to have the link to the GitHub repository for that SonarCloud project. This link is not provided at the moment when the SonarCloud project is created by performing the first scan.

We currently have no plans yet to support your use-case. I suggest to create a post in Suggest New Features if this is something you would like to see.

I do not think this thread is related to your issue.

Hello Tom

Thanks for your reply.

Just to make sure I understand correct, this means that only projects initiated manually on sonarcloud.io, by an organisation administrator will have PRs decorated? Or is it possible to enable PR decoration in some other way? I.e. is it possible to enable PR decoration after the project have been initiated on sonarcloud, by adjusting settings, without having to delete it, and re-create?

Correct!

Currently this is not possible. We do have this functionality on the roadmap, but we can’t specify an exact timeline yet. You can follow this ticket to get updates on this feature. In the context of this ticket a manual project means a project that is created without an ALM (ie: GitHub) connection, the automatic creation of a project through the Maven scanner would also be a manual project in this context.

Hope that clears it up a bit!

Ok, thank you for clearing up. I will create a post to suggest a new feature, as you suggested.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.