GitHub Enterprise PR decoration troubleshooting

Versions:
SonarQube 8.1 Developer edition, Scanner: 3.2.0.1227

PR Decoration issues

I followed the procedure described on https://docs.sonarqube.org/8.1/analysis/pr-decoration/ and created and installed the GitHub app, configured the project specific details regarding the PR decoration configuration. GitHub URL in the configuration is configured as https://github.enterprise.url/api/v3/ as described in the field description. The app id and the pub key have been added. The repo identifier is set as the part of the URL after the github.url/ of the repo URL, e.g. user/repo .

The PR analysis is triggered by a Jenkins job using the sonar maven plugin that parses a GitHub webhook sent when a change is made on a PR and filters only the opened and reopened states of the PR and sets the following parameters as:

        -Dsonar.pullrequest.key=value_from_the_json_webhook_content \ 
         //pull request key is the value that
         //I am worried about
         //It's value is the pr number from the repo.
         //Is that correct?
        -Dsonar.pullrequest.branch=value_from_the_json_webhook_content \
        -Dsonar.pullrequest.base=value_from_the_json_webhook_content

The GitHub app as far as I can see has no requests.

SonarQube logs show the following:

    2020.10.06 13:52:40 INFO  ce[AXT-L0qhepwtE--TiEcp][o.s.c.t.p.a.p.PostProjectAnalysisTasksExecutor] Pull Request decoration | status=SUCCESS | time=3129ms
    2020.10.06 13:52:41 INFO  ce[AXT-L0qhepwtE--TiEcp][o.s.c.t.CeWorkerImpl] Executed task | project=project-key | type=REPORT | pullRequest=pull-request-number | id=AXT-L0qhepwtE--TiEcp | submitter=username | status=SUCCESS | time=12545ms

The repo has the app installed. But no checks are reported on the PR.

How can I troubleshoot this further, or perhaps you could help me with the cause?

Hey @jabdulah,

First, think about updating to SQ 8.5. Things move fast, some bugs are fixed, improvements made, etc. Also Scanner-wise: 3.2 is 2,5 years old now, we recently released 4.5!


That is correct.


In those cases, you did well checking at logs, it’s there that you could investigate what’s happening. Though I’m not sure you enabled the Debug mode, did you? (read more about it here). In Debug mode, the query is logged (with all its content, to check if it makes sense), also are potential error messages (timeout, permissions issues, etc.).

Doing this will be the starting point to understand what is going on here.

I hope this helps.

Antoine