Hi,
We have migrated the repository from old organization to a new organization and we can see that SonarCloud isn’t picking up newly opened pull requests, thus our scans are failing.
- ALM used: GitHub
- CI system used: GitHub Actions
- Scanner command used when applicable (private details masked)
run: mvn sonar:sonar -Dsonar.host.url=https://sonarcloud.io -Dsonar.projectKey=projectkeythatweusedbefore -Dsonar.organization=oldorgname -Dsonar.pullrequest.base=develop -Dsonar.pullrequest.key=${{ github.event.number }}
- Languages of the repository
Java - Error observed
Error: Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.9.1.2184:sonar (default-cli) on project parent: Could not find the pullrequest with key '431': Error 404 on https://sonarcloud.io/api/alm_integration/show_pullrequest?project=projectkeythatweusedbefore&pullrequestKey=431 : {"errors":[{"msg":"The pullrequest could not be found"}]} -> [Help 1]
Error:
Error: To see the full stack trace of the errors, re-run Maven with the -e switch.
Error: Re-run Maven using the -X switch to enable full debug logging.
Error:
Error: For more information about the errors and possible solutions, please read the following articles:
Error: [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Error: Process completed with exit code 1.
- Steps to reproduce
- Create repo in org A
- Configure sonar scans using GitHub application integration
- Transfer repository from org A to org B (both are on a paid plan in sonarcloud)
- Rename repo from
oldname
tonewname
- Observer that when you are creating pull requests they are not visible in https://sonarcloud.io/project/pull_requests_list?id=projectkeythatweusedbefore
- Potential workaround
- None found