Pointing to a migrated Git repo

Template for a good new topic, formatted with Markdown:

I recognize that this is 1000% an edge case, but is there any way to adjust the ALM URL so that it points to our new forked repo or is deleting/recreating the SonarCloud project the advisable route?

Hey there.

Just to make sure I understand – can you describe the behavior a little more? If scans aren’t connecting to the right repo… what is happening (or how can you tell)?


Hi Colin!

Thanks for your reply! Let’s call the organizations org-A and org-B. We transferred a GitHub repository from org-A to org-B and then created a new fork of the repository back in org-A. It seems SonarCloud references followed the repo to org-B (which I suppose makes sense since the repo was transferred), but we wanted to keep scanning the repo in org-A.

Unfortunately the SonarCloud project has since been deleted and recreated, so I can’t point you to the old project directly, but when we opened a PR, the GitHub link in the SonarCloud project redirected to org-B and SonarCloud was using PR references (i.e the destination branch and source branch) from org-B instead of org-A, so it wasn’t able to scan properly.

I hope that makes sense–let me know if anything there isn’t clear!

If it helps I do have logs from this PR #7, which was a test to introduce a vulnerability and should fail the Quality Gate:

  • The old project where it was pointing to org-B: SonarCloud logs
  • The new project after we delete/recreated it and it was pointing to org-A: SonarCloud logs