We have recently migrated our Azure Git repository from project A to project B under the same organization in Azure DevOps. There is no documentation/steps explained about migrating the sonarcloud project if there is change in the source code repository of the azure devops project.
Note: Both projects are under same organization in Azure Devops
Could you please assist how to refer the new azure devops project reference in the existing project in Sonarcloud by updating the project key or do we need to be import as new project?
If you want to keep your history, then I believe you only need to make sure your ProjectB analysis uses the sonar.projectKey that used to belong to ProjectA.
If you don’t care about the history, then you can just delete ProjectA and import ProjectB.
Thanks for your reply.
As you suggested I have updated the Project B project key to refer the project A but now I am getting the below error. Could you please assist on it.
ERROR: Could not find a default branch to fall back on.
The analysis / scanner log is what’s output from the analysis command. Hopefully, the log you provide - redacted as necessary - will include that command as well.