This error appears after the line INFO: Load branch configuration and the warning that appears in sonarcloud is that * Could not find ref ‘master’ in refs/heads, refs/remotes/upstream or refs/remotes/origin. You may see unexpected issues and changes. Please make sure to fetch this ref before pull request analysis.
This problem only occurs in projects that are bound between a project in Bitbucket Cloud and a Project in SonarCloud.
Hi Colin,
Thanks for you interest. I have created a new pull request and tried again, and I am still experiencing the error.
The sonar command I am using is:
sonar-scanner -Dsonar.organization=org -Dsonar.projectKey=proj-dev -Dsonar.sources=. -Dsonar.pullrequest.key=1860 -Dsonar.pullrequest.branch=sonarcloud-test-pull-request -Dsonar.pullrequest.base=master -Dsonar.javascript.node.maxspace=8192 -Dsonar.javascript.allowTsParserJsFiles=false
And further info about the scanner and SO:
INFO: SonarScanner 4.8.0.2856
INFO: Java 11.0.3 Oracle Corporation (64-bit)
INFO: Mac OS X 10.16 x86_64
Hi Alexander,
Thank you for your response and interest.
Yes, I am still facing the issue, and I checked that the PR target branch is fetched in local. In fact, we follow the same procedure for the other projects that do work, without the only difference that the projects that fail are the ones that are bound with bitbucket.
I have provided the log to Colin in a private message.
Best regards.