Github integration not working

Recently I have set up a new project to have sonar coverage. The information is displaying properly in sonar but the Pull Request comments are not getting back to the PR and the status check remains in waiting. I checked the background tasks and they are all successful. Here is the id of a successful run for a PR:

The scan is running in Jenkins and our code is hosted in Github.

I am sure the error is something very silly on my end, but I am not able to figure it out. Any help is highly appreciated.

Hi @dcacenabes,

I see that you have quite a few projects in the organization that are bound to GitHub. By bound I mean they were imported by clicking “+” button in the top right corner and selected from the available repositories on GitHub
May I ask why did you create the project manually instead? Having the project bound means, there is no need to pass additional properties to make checks and summary comment working.


Hi @Marcin_Majewski,
Thanks for your quick reply! We are evaluating using the API to create new projects in the short future. I was not aware that there were further configuration steps required. Could you point me to the documentation stating which are the parameters we need to pass in order for the annotations to work with projects manually created? For this specific project I just recreated it manually by following your indications, but still we want to be able to configure this.

Thanks in advance!


Hi @dcacenabes,

For this purpose you will need sonar.pullrequest.provider=GitHub and sonar.pullrequest.github.repository=<your github slug>. This is not present in the dosc for the moment (as we recommend the users, importing projects from the SonarCloud and selecting it from present GitHub repositories), but we are working actively to improve them.


Thanks again @Marcin_Majewski. I have a final question. If we create a project by clicking the + button and selecting an existing repo, will GH PR annotations work if we pass in the params sonar.pullrequest.provider and sonar.pullrequest.github.repository ?

Yes, they will work. The properties will be just ignored if you have the repository bound to GitHub.

Thank you!

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