Update link to repository in sonarcloud project

we recently moved from using service specific repositories (each was connected to different Sonarcloud project) to using monorepo.

from within sonarcloud project nothing should change, we still only check the scope of individual service in each project

However is seems that Sonarcloud project is tightly linked to DevOps repository and now when we create a pull request from monorepo and do a sonar scan, we get this error:
##[error]ERROR: Error during SonarScanner execution
ERROR: Could not find the pullrequest with key ‘12708’
ERROR: Caused by: Error 404 on https://sonarcloud.io/api/alm_integration/show_pullrequest?project={PROJECTNAME}&pullrequestKey=12708 : {“errors”:[{“msg”:“Unable to find the pullrequest with key \u002712708\u0027”}]}
ERROR:
ERROR: Error during SonarScanner execution
ERROR: Could not find the pullrequest with key ‘12708’
ERROR: Caused by: Error 404 on https://sonarcloud.io/api/alm_integration/show_pullrequest?project={PROJECTNAME}&pullrequestKey=12708 : {“errors”:[{“msg”:“Unable to find the pullrequest with key \u002712708\u0027”}]}

So my question is - how can we update link to new DevOps repository in existing Sonarcloud project?

Hey there.

That’s true.

Unfortunately, you will need to reconfigure your projects as a monorepo which means deleting existing projects and re-adding them as part of a monorepo. This will allow SonarCloud to look up the PR on Azure DevOps no matter which of the SonarCloud projects (making up that monorepo) is being analyzed.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.