Migrate repository to new GitHub Org - not syncing PRs

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
  • Potential workaround
  • None found

Hi and sorry for the late reply,

Are you still facing this issue?

I think you could solve it by deleting the project in org A in SonarCloud and re-importing it in org B in SonarCloud. You would lose the history of your project but we currently don’t have a feature for transferring a project from an org to another so this is the only way for now.

This is exactly what we did, history though… we’re kinda sad about that as now we don’t have a way to track amazing progress across last years.

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