Need guidance on configuring PR Decoration

HI Team,

I am using SonarQube LTS 7.9.1 with JDK11.0.3. Github Team(not enterprise)

Would appreciate step-by-step instructions on how to configure the PR Decorations.

Thanks in advance.

Hi,

I guess by GitHub Team, you mean that you want to integrate with GitHub.com? If so, you should be aware that while SonarQube + GitHub.com should work, it’s not officially supported. That said, this is probably where you want to start: https://docs.sonarqube.org/latest/instance-administration/github-application/

Once you’ve done the setup in GH and SonarQube, you’ll also need to set up your CI/CD system to trigger analysis on PRs. This page talks about the setup for that: https://docs.sonarqube.org/latest/analysis/pull-request/.

 
HTH,
Ann

HI Ann,

Thanks much for the links and have followed all the steps from both of the links.

SonarQube UI Shows the PR analysis properly, but do not see the sonar checks visible in github PR page. Is there anything else I need to verify to make sure the PR checks visible in github pr checks page ?

Thank you.

Hi,

Is there anything related to this in your analysis log? Any warnings on the project homepage?
Selection_592

 
Ann

Yes Ann, I see one warning and it says

“Pull request decoration did not happen. Please install SonarQube Github application on the repository’s organization or user.”

But I have already installed it. ?

Hi,

It sounds like you’re missing at least the last step (“Installing Your App”) on this pag: https://docs.sonarqube.org/latest/instance-administration/github-application/

 
Ann

HI Ann,

I made sure the application is installed for that specific repository. But still getting the same warning on the dashboard. Am I missing anything ?

And also, I have installed it in my user account and tested for separate repository as well, still same warning.

HI Ann,

It is working fine now after re-generating the github app private key and updating in global settings, github api endpoint and with a bounce of sonar restart.

Thanks for your time.
Hanumanth.

1 Like