which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
SonarQube EE 7.5
SonarScanner 3.3
what are you trying to achieve
Unable to get PR decoration as one of the checks show on my PR
what have you tried so far to achieve this
I have sent as part of my gradle file
//PR request Analysis parameters
property “sonar.pullrequest.github.repository”, “my repo”
property “sonar.pullrequest.branch”, GIT_BRANCH //example origin/branch name
property “sonar.pullrequest.key”, PULL_REQUEST_NUMBER //unique identifier of PR
property “sonar.pullrequest.base”, “develop”
property “sonar.pullrequest.github.token.secured”, " personal access token"
My jenkins build is passing with success as below.
GitHub has been notified of this commit’s build result
Finished: SUCCESS
Can you get decoration when you run the scan locally, not from Jenkins? We should get that working first (easy to debug), and then make it work on Jenkins. Let me know how that goes.
Some suspicious points in your post:
Just to be sure, the repo should look like orgname/reponame, for example SonarSource/sonar-java. It’s not just sonar-java.
A better example is branch name (without the origin/), but this is not an issue either way.
Just to be sure, the PULL_REQUEST_NUMBER here should be the pull request number on GitHub. For example in https://github.com/SonarSource/sonar-java/pull/2602 it’s the number 2602.
Yes, your post did not include -Dsonar.pullrequest.provider=github, and that’s needed.
And yes, it’s good to first make it work by running the scanner manually, and once you manage to make it work that way, then try to configure Jenkins to do the equivalent.
After the analysis is completed, take a look at the pull request’s page on your SonarQube. It should show a link to the PR on GitHub. If something went wrong (with decoration, or others), you may also see there a small yellow box with warnings. They should help you resolve the problems. Or else make sure to include them in your next post.
Hi Jason,
I have got the PR Decoration working now end to end for android . It was a github oauth token issue.
Can you share steps for iOS properties that i need to add?
Currently i only see these 2 properties in the sonar project.properties file.
sonar.scm.enabled=true
Let’s keep one topic per thread. This thread is about troubleshooting PR decoration. Your new question is going in the direction of “how to anlayze IOS projects”. Please take a look at our documentation, in particular analyzing source code, and the guide to generate coverage report for Swift might also be useful in your case. If you still need help, then please start a new topic.