- ALM used Github Enterprise
- CI system used AWS CodeBuild
- Scanner command used when applicable (private details masked)
- Languages of the repository: Java
Hi,
I would like to configure our project to report the analysis status to GitHub PRs on our PullRequest Analysis.
We run our unit tests in an AWS CodeBuild container and use the Maven sonar-scanner to report the static analysis and code coverage to Sonarcloud.We can see PullRequest Analysis worked in our sonarcloud page, But in GitHub PullRequest, we can not see decoration from sonarcloud.
Does anybody know how to decorate GitHub PR?
Here’s how we invoke sonar-scanner
mvn org.sonarsource.scanner.maven:sonar-maven-plugin:sonar \
-Dsonar.pullrequest.github.repository=$REPO \
-Dsonar.sourceEncoding=UTF-8 \
-Dsonar.projectKey=$KEY \
-Dsonar.pullrequest.base=$BASE \
-Dsonar.pullrequest.key=$PR_KEY \
-Dsonar.pullrequest.branch=$BRANCH \
-Dsonar.pull.request.provider=GitHub\
Here’s our current sonar-project.properties:
<sonar.organization>$ORGANIZATION</sonar.organization>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
<sonar.coverage.jacoco.xmlReportPaths>**/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
We also set environment variables GITHUB_TOKEN
and SONAR_TOKEN
.
Our organization bound to GitHub
Here’s our PullRequest Analysis in sonarcloud
We set Enable summary comment
on
Thanks