Pull Request Decoration not working with enterprise git

I was trying to run pull request analysis using SonarQube 7.3 version Developer Edition. The analysis is successfully run on the PR and it is visible in SonarQube dashboard but the corresponding PR is not decorated. I am enterprise git and have specified the access token as well in pull request settings in Project Administration as well as in general administration.
I have specified the following properties from CLI

mvn -B sonar:sonar -Dsonar.scm.disabled=true -Dsonar.projectKey=EVERGREEN_SHOOTS_REFERENCE-SNAPSHOT-COVERAGE-com.adobe.aemforms:test-evergreen -Dsonar.projectName=EVERGREEN_SHOOTS_REFERENCE-SNAPSHOT-COVERAGE-test-evergreen -Dsonar.host.url=https://aemforms.cq.corp.adobe.com -Dsonar.pullrequest.branch=PR-3 -Dsonar.pullrequest.key=3 -Dsonar.pullrequest.base=master -Dsonar.login=**** '-Dsonar.password=****'

following are logs produced from the same

13:10:42 [INFO] Scanning for projects...
13:10:43 [INFO] 
13:10:43 [INFO] -----------------< com.adobe.aemforms:test-evergreen >------------------
13:10:43 [INFO] Building test-evergreen 1.0-SNAPSHOT
13:10:43 [INFO] --------------------------------[ jar ]---------------------------------
13:10:43 [INFO] 
13:10:43 [INFO] --- sonar-maven-plugin: (default-cli) @ test-evergreen ---
13:10:43 [INFO] User cache: /home/centos/.sonar/cache
13:10:43 [INFO] SonarQube version: 7.3.0
13:10:43 [INFO] Default locale: "en_US", source code encoding: "UTF-8" (analysis is platform dependent)
13:10:43 [INFO] Publish mode
13:10:43 [INFO] Load global settings
13:10:44 [INFO] Load global settings (done) | time=347ms
13:10:44 [INFO] Server id: 8E8A993D-AWXQO_JBJ5ytMHi2eeJO
13:10:44 [INFO] User cache: /home/centos/.sonar/cache
13:10:44 [INFO] Load/download plugins
13:10:44 [INFO] Load plugins index
13:10:44 [INFO] Load plugins index (done) | time=244ms
13:10:44 [INFO] Load/download plugins (done) | time=316ms
13:10:45 [INFO] Loaded core extensions: branch-scanner
13:10:45 [WARNING] Unable to load colorizer: org/sonar/api/web/CodeColorizerFormat
13:10:45 [WARNING] Unable to load colorizer: com/github/sonarperl/colorizer/PerlCodeColorizer
13:10:45 [INFO] Process project properties
13:10:45 [INFO] Load project branches
13:10:45 [INFO] Load project branches (done) | time=215ms
13:10:45 [INFO] Load project pull requests
13:10:46 [INFO] Load project pull requests (done) | time=220ms
13:10:46 [INFO] Load branch configuration
13:10:46 [INFO] Load branch configuration (done) | time=5ms
13:10:46 [INFO] Load project repositories
13:10:46 [INFO] Load project repositories (done) | time=282ms
13:10:46 [INFO] Load quality profiles
13:10:46 [INFO] Load quality profiles (done) | time=242ms
13:10:46 [INFO] Load active rules
13:10:51 [INFO] Load active rules (done) | time=5023ms
13:10:51 [INFO] Load metrics repository
13:10:51 [INFO] Load metrics repository (done) | time=223ms
13:10:51 [INFO] Project key: EVERGREEN_SHOOTS_REFERENCE-SNAPSHOT-COVERAGE-com.adobe.aemforms:test-evergreen
13:10:51 [INFO] Project base dir: /apps/jnkn/workspace/green-Shoots-Reference_PR-3-G3HXY7NGPIN6PSRUW6KSLS5CTCOGLPOHPFRFTCDXN6Z3GURT4VVQ/main
13:10:51 [INFO] Pull request 3 for merge into master from PR-3
13:10:51 [INFO] -------------  Scan EVERGREEN_SHOOTS_REFERENCE-SNAPSHOT-COVERAGE-test-evergreen
13:10:51 [WARNING] Unable to load colorizer: com/github/sonarperl/colorizer/PerlCodeColorizer
13:10:51 [INFO] Base dir: /apps/jnkn/workspace/green-Shoots-Reference_PR-3-G3HXY7NGPIN6PSRUW6KSLS5CTCOGLPOHPFRFTCDXN6Z3GURT4VVQ/main
13:10:51 [INFO] Working dir: /apps/jnkn/workspace/green-Shoots-Reference_PR-3-G3HXY7NGPIN6PSRUW6KSLS5CTCOGLPOHPFRFTCDXN6Z3GURT4VVQ/main/target/sonar
13:10:51 [INFO] Source paths: pom.xml, src/main/java
13:10:51 [INFO] Test paths: src/test/java
13:10:51 [INFO] Source encoding: UTF-8, default locale: en_US
13:10:51 [INFO] Load server rules
13:10:52 [INFO] Load server rules (done) | time=839ms
13:10:52 [INFO] Index files
13:10:52 [INFO] 5 files indexed
13:10:52 [INFO] Quality profile for java: Sonar way
13:10:52 [INFO] Quality profile for xml: Sonar way
13:10:54 [INFO] Sensor JavaSquidSensor [java]
13:10:54 [INFO] Configured Java source version (sonar.java.source): 5
13:10:54 [INFO] JavaClasspath initialization
13:10:54 [WARNING] Bytecode of dependencies was not provided for analysis of source files, you might end up with less precise results. Bytecode can be provided using sonar.java.libraries property
13:10:54 [INFO] JavaClasspath initialization (done) | time=11ms
13:10:54 [INFO] JavaTestClasspath initialization
13:10:54 [INFO] JavaTestClasspath initialization (done) | time=0ms
13:10:54 [INFO] Java Main Files AST scan
13:10:54 [INFO] 2 source files to be analyzed
13:10:55 [WARNING] Metric 'comment_lines_data' is deprecated. Provided value is ignored.
13:10:55 [INFO] 2/2 source files have been analyzed
13:10:55 [INFO] Java Main Files AST scan (done) | time=479ms
13:10:55 [INFO] Java Test Files AST scan
13:10:55 [INFO] 2 source files to be analyzed
13:10:55 [INFO] Java Test Files AST scan (done) | time=56ms
13:10:55 [INFO] Sensor JavaSquidSensor [java] (done) | time=1039ms
13:10:55 [INFO] Sensor SurefireSensor [java]
13:10:55 [INFO] 2/2 source files have been analyzed
13:10:55 [INFO] parsing [/apps/jnkn/workspace/green-Shoots-Reference_PR-3-G3HXY7NGPIN6PSRUW6KSLS5CTCOGLPOHPFRFTCDXN6Z3GURT4VVQ/main/target/surefire-reports]
13:10:55 [INFO] Sensor SurefireSensor [java] (done) | time=3ms
13:10:55 [INFO] Sensor JaCoCoSensor [java]
13:10:55 [INFO] Sensor JaCoCoSensor [java] (done) | time=1ms
13:10:55 [INFO] Sensor SonarJavaXmlFileSensor [java]
13:10:55 [INFO] 1 source files to be analyzed
13:10:55 [INFO] Sensor SonarJavaXmlFileSensor [java] (done) | time=404ms
13:10:55 [INFO] 1/1 source files have been analyzed
13:10:55 [INFO] Sensor XML Sensor [xml]
13:10:55 [INFO] Sensor XML Sensor [xml] (done) | time=95ms
13:10:55 [INFO] Sensor Zero Coverage Sensor
13:10:55 [INFO] Sensor Zero Coverage Sensor (done) | time=11ms
13:10:55 [INFO] Sensor JavaSecuritySensor [security]
13:10:55 [INFO] UCFGs: 2, excluded: 2, source entrypoints: 0
13:10:55 [INFO] No UCFGs have been included for analysis.
13:10:55 [INFO] Sensor JavaSecuritySensor [security] (done) | time=55ms
13:10:55 [INFO] Sensor CSharpSecuritySensor [security]
13:10:55 [INFO] UCFGs: 0, excluded: 0, source entrypoints: 0
13:10:55 [INFO] No UCFGs have been included for analysis.
13:10:55 [INFO] Sensor CSharpSecuritySensor [security] (done) | time=0ms
13:10:55 [INFO] Sensor Java CPD Block Indexer
13:10:55 [INFO] Sensor Java CPD Block Indexer (done) | time=15ms
13:10:55 [INFO] SCM Publisher is disabled
13:10:55 [INFO] Skipping CPD calculation for short living branch and pull request
13:10:56 [INFO] Analysis report generated in 77ms, dir size=74 KB
13:10:56 [INFO] Analysis reports compressed in 8ms, zip size=19 KB
13:10:56 [INFO] Analysis report uploaded in 215ms
13:10:56 [INFO] ANALYSIS SUCCESSFUL, you can browse https://aemforms.cq.corp.adobe.com/project/issues?id=EVERGREEN_SHOOTS_REFERENCE-SNAPSHOT-COVERAGE-com.adobe.aemforms%3Atest-evergreen&pullRequest=3&resolved=false
13:10:56 [INFO] Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report
13:10:56 [INFO] More about the report processing at https://aemforms.cq.corp.adobe.com/api/ce/task?id=AWY432LvwNrbKp0y2SMc
13:10:56 [INFO] Task total time: 11.781 s
13:10:56 [INFO] ------------------------------------------------------------------------
13:10:56 [INFO] ------------------------------------------------------------------------
13:10:56 [INFO] Total time: 14.290 s
13:10:56 [INFO] Finished at: 2018-10-03T07:40:56Z
13:10:56 [INFO] ------------------------------------------------------------------------

Can somebody please help if anything else needs to be configured?

Can somebody help on this issue?


To be clear, when you say “enterprise git” you mean GitHub Enterprise? And if so, have you configured the API URL for your instance? Also, when you created the Authentication token, what permissions did you give it? As documented in the interface, these permissions are required:

“repo:status” and “public_repo” permissions for public repositories, and all of “repo” permissions for private ones


Thanks for your help! I was able to update the issue by updating the git personal access token in SonarQube.


1 Like