Created a Github App with the proper permissions and installed it on the proper repositories
Read access to commits / metadata. Read / Write to checks and Pull Requests
Filled out Github App information In the Administration > ALM Integrations Tab
Applied settings to project (/api/alm_settings/get_binding?project=sporttrade_st-devops shows {"key":"sporttrade","alm":"github","repository":"sporttrade/st-devops","url":"https://api.github.com","summaryCommentEnabled":false})
Jenkins is using the Git Branch Source Plugin, so no extra parameters are passed during sonarqube scanning. Note - this runs in a Jenkins shared library if that has any impacts. An example run is shown below:
I am experiencing similar results, using SonarQube 8.4.2, also 8.5.1 Developer Edition. Logs show PR decoration success, but analysis page shows warning about mis-configured pull-request properties. I am able to achieve successful PR decoration on a different project (uses same GitHub API app) although icons are not showing:
Awesome! Are you using a CI runner like Jenkins to run your analysis? My analysis page shows no errors, so I’m not sure if I’m missing a parameter or if GitHub is deferring the request from SonarQube.
Yes, we have. Our GitHub App does communicate with SonarQube as we can import new SonarQube projects from GitHub through the SonarQube UI. It only seems to disconnect with PR decoration. Any thoughts on where to look?
If migrating to 8.5.1 is an option, I’d highly recommend that you do. We’ve improved logs around possible error in this version. That would help to investigate.
I’d also recommend that you verify your project settings for PR decoration: Project settings > Pull Request Decoration.
Feel free to share snapshot if you think it could help.
No, it was declared through SonarQube Developer edition, would that be an issue? Upgrading to 8.5.1 is not an immediate option, but could be in the near future.
where env.project is the project key in sonarqube.
We also made sure to follow the documentation you provided as we use Multi-branch pipelines. However, it looks like support from that is supported in 8.5, and not in 8.4.
I’ll set the debug level a little bit higher and then check it out.
You’re trying to integrate with Github.com on SonarQube v8.4.1. See this post for details on why you need to upgrade for PR Decoration to keep working.
(v8.4.2 is mentioned, but v8.5.1 is the latest version of SonarQube, and the only version you should target for an upgrade).