We are using sonarcloud with azuredevops and we are able to see all the branches and PR’s populate on sonar after connecting them through the PAT having the required permissions.
But once we apply sonarcloud status check on a target branch’s branch policy, we do not see the status check getting any info from sonarcloud and stays in the waiting state
We followed the solution in doc
But it also did not work , please suggest a possible solution for the above issue
Extra details
-
ALM used → Azure DevOps
-
CI system used → Azure DevOps
-
Scanner command used when applicable (private details masked)
- task: SonarCloudPrepare@1
inputs:
SonarCloud: ‘SonarCloud’
organization: ‘zinfi’
scannerMode: ‘CLI’
configMode: ‘manual’
cliProjectKey: ‘key_name_changed’
cliProjectName: ‘name_changed’
cliSources: ‘.’
extraProperties: |
sonar.pullrequest.provider=“vsts”
sonar.pullrequest.vsts.instanceUrl=“Azure DevOps Services | Sign In
sonar.pullrequest.vsts.project=“name_changed_project”
sonar.pullrequest.vsts.repository=“***UI”
- task: SonarCloudPrepare@1
-
Languages of the repository - node.js
-
Only if the SonarCloud project is public
-
pull request - Azure DevOps Services | Sign In
*Error observed
-
Sonarcloud status check in waiting state
-
Could not find ref ‘develop’ 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.
-
Shallow clone detected during the analysis. Some files will miss SCM information. This will affect features like auto-assignment of issues. Please configure your build to disable shallow clone.
Steps to reproduce
Apply sonarcloud status check on target branch’s policy