Change GitHub organization name and reset the organization binding, but our project is still bound

G’day Forum.

We changed our GitHub organization name a while back and re-bound our SonarCloud organization accordingly, but we can’t get our main project to bind to the new organization for some reason. It’s still showing up as the old organization name on the “This project is bound to GitHub” icon and we are no longer getting comments attached to Pull Requests in GitHub. We are still getting analyses done correctly, but for some reason we can’t change the project binding. We’ve tried uninstalling the Sonarcloud app from our GitHub organization and all that, and the organization binding is fine, but the project binding remains, even when we uninstall the GitHub app.

Any pointers or suggestions?

Cheers

Hi,

There is currently no feature to unbind and then re-bind a project to something else. We have the feature in our backlog for quite some time but it didn’t get the attention that it deserves yet.

Also unbinding an org by uninstalling the Github app doesn’t unbind the orgs projects.

The only way to unbind and re-bind a repository currently is actually to delete the project from SonarCloud and to re-import it from Github. This means you’d lose your history of that project in SonarCloud, which might be fine if you don’t care about it.

When you say you renamed your Github Org and re-bound it, does that mean you created a new org on Github? Because I would not think that you need to re-bind it if you do a normal renaming.

Also is it a private or public project? Can you share the organization and project key so that I can have a look from my side? If those are private information I can open a private discussion channel with you.

G’day Grégoire.

We would like to keep the history for this project, as it is a private project for our main SaaS application. We “renamed” the organization in the sense that we upgraded to GitHub Enterprise and created a new organization, then transferred the existing repos over to the new organization. The organization is now bound correctly, and generally everything works, but the project is still bound to the old project’s organization and we don’t receive things like the SonarCloud comments in PRs and such.

If you would like to discuss further, we should do so via a private channel, as the keys and details and whatnot would be confidential as it is a private organization.

Cheers

Alright, I better understand the situation now. So you had more than one repo when you did the renaming right? But only one project in SonarCloud at the time and that’s the one that doesn’t have proper binding, right?

I’ll reach out to you privately to get more info.

Yeah, we had both the old organization which is still technically running but is on an older GitHub Teams subscription but has been emptied of all repos, and then we have the new organization, which is a GitHub Enterprise account. We transferred over ownership of all of our repos into the new organization, but we’ve kept the old organization around because we need to do some testing of integrations we have against both Teams and Enterprise accounts, so we figured we’d keep them both, but the Teams one is really just a sandbox at this point. We have a bunch of repos in GitHub in our Enterprise account, but only one of them is used by SonarCloud.

The project binding was manually fixed on our side.

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