Pull request decoration did not happen

Hi.

We have a project in GitHub (private repo). It’s built with CircleCI. But we tried to run sonarqube scan locally with the same results.

The analysis in Sonarcloud gets created successfully, but PR decoration fails. Sonarcloud shows the following warning message:

Pull request decoration did not happen. Please install SonarCloud Github application on the repository's organization or user.

Of course, we double-checked - the GitHub application for the repository is installed.

The scan is run with Gradle sonarqube plugin. The plugin version is 2.7, tried also with 2.8, which is the latest currently.

There is a newer project in the same GitHub org, same Sonarcloud org, scanned and analyzed in Sonarcloud in almost the same way, for which the PR decoration works fine.

Please help.

Hi @dc-up42, welcome to the community forum!

That is unexpected behaviour, can you please check that the Github app that is installed on your organization has access to all the repositories in your organization? You can do that by going to Settings > Applications > SonarCloud > Repository Access.

My apologies for the late response,
Tom

Thank you for replying.

The SonarCloud GitHub app has access to all the repos it’s relevant for, including the problematic one.
Also, while trying to resolve the problem, I gave it access to ALL repos in the organization. It didn’t help.

Did you import the project that is failing through GitHub (do you see a GitHub icon next to the project name)? Or do you manually set the property sonar.pullrequest.github.repository somewhere in your CircleCI build?

The icon is there.

The repository name is set in the “project settings -> Integration with GitHub -> Repository Identifier” field in Sonarcloud.

Can you please remove that setting and check if that changes anything? That setting is not necessary when you imported your project through Github.

If you want to set it manually you should make sure that it contains the repository slug (so put organization/repository and not just repository)

Tried resetting the setting - didn’t help.

Also, we had a valid repository slug.

Lacking the progress here, we created another Sonarcloud project anew. Analysis works as expected for the new one.

Although we haven’t solved the underlying project, but this thread is redundant now.

Hi @dc-up42, I’m glad you found a suitable alternative.

I created a ticket (SCCOMM-15) to fix the underlying issue.