PR decoration failing: Could not find a suitable sha1 to decorate, skip decoration

Sonarqube version: 7.7.0.23042
Analysing an android project using the sonarqube gradle plugin.

We are struggling to get PR decoration working for our android projects. The server logs at all logging levels shows the error

“Could not find a suitable sha1 to decorate, skip decoration.”

with no other information.

The analysis and quality gate is working correctly and I can see it in sonarqube. The link from sonarqube to the PR is working correctly. The Sonarqube app is installed in github and the checks tab is picking up when the analysis is queued but never gets decorated in the PR. There are no warnings in sonarqube on the branch analysis page.

I have only seen a couple of posts about this error and one suggested that it could be to do with CI simulating a merge before the analysis was done, but I have ruled this out by running locally.

I can’t think of what else to look into? Any ideas would be greatly appreciated!