Github pull request decoration failing, missing commit SHA

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)

    • sonarqube: Developer EditionVersion 10.4.1 (build 88267)
    • scanner: sonarsource/sonarqube-scan-action@master on github actions
  • how is SonarQube deployed: zip, Docker, Helm

  • what are you trying to achieve
    I have a github ruleset requiring a passing status check for sonarqube code analysis, this has been working for a couple of weeks now, but today on one of the PRs requiring the passing status check the github action kicked off and completed successfully, and the PR in my sonarqube console is passing, but I see a warning on that page[1]. I am guessing the reason my status check isn’t reporting is this but I am not sure why the commit is missing or what to do to fix this.

  • what have you tried so far to achieve this
    So far I have attempted to re-run the workflow in github, delete the PR in sonarqube, and run the workflow in github again, but am now at a loss for what to do next.

Do not share screenshots of logs – share the text itself (bonus points for being well-formatted)!

Pull request decoration failed. Commit '9858f156...' not found in pull request '1292'


Does that commit actually exist in the PR/branch on the GitHub side? This looks like a local commit (to preview the merge?) CI-side.


Yes that’s correct that commit SHA doesn’t appear in my branch on GH which is confusing, the developer in charge of this branched mentioned that he had to do a git reset which would explain the missing commit SHA but I see no way to manage which commits sonarqube is referencing and with no reference to it in GH I am kind of at a loss for what to do to unblock this branch. Is the only option to make a new branch and PR?


You need to make sure that the code the CI checks out is the code that’s analyzed. That’s it. Just make sure there are no additional commits, CI-side.