SonarCloud + Azure DevOps + GitHub

I have a similar situation to this issue: SonarCloud + Azure DevOps + Github Integration = not reporting to Github PR

I have a SonarCloud account linked to Azure DevOps but my code is in GitHub, so pull request analysis and decoration is not working. I think I need to have my account linked to GitHub instead, but someone from support needs to assist.

I can just create a new account linked to GitHub if that’s easier, but then I’ll need my subscription moved over.

Hi Justin,

Thank you for your post. Could you please provide me with the name of your organisation? Let me know if you want a private channel to share the information, I will create one.

The org name is ‘maple-dev’.

Please delete the binding from Azure DevOps so that I can set it up again with GitHub.

Hi Justin,

I will delete the binding from Azure DevOps platform.
Then you have to follow the steps:

  1. Uninstall SonarCloud app in GitHub
  2. Log in with your GitHub account
  3. Log out and log in with azure devops account
  4. Go to administration of the organisation → members → add your github account as owner of the organization
  5. Log out and log in with GitHub account
  6. Go to org settings and click “Bind you organization to GitHub”
  7. The decoration will now work

After that you will have two projects living in SonarCloud, the new project you have just imported from GitHub and the old project you imported manually.

Is it ok for you?

Yes, please go ahead.

@justincowling, please reply to my private message, so I can move on with the unbinding.

@justincowling, unbinding is done, and you can proceed with the next steps.

That worked, but I still can’t select github as the source provider for the original project. Do I need to move the project and the paid subscription to the new github organization? I don’t care about history, I just need to get my paid subscription working properly.

I have checked your organization, and it is not bound to GitHub yet. You won’t be able to import your GitHub project until your organization is bound to Github.

Follow these steps to bind your organization to Github:

Go to Administration → Organization settings
image (2)

Then go to “Bind this organization to Github” section, and click on “Choose the organization on Github”, then select your organization

Once your organization is bound to GitHub, you can import your project.

Let me know if you face any issues with the binding.

1 Like