# SonarCloud + Azure DevOps + Github Integration = not reporting to Github PR

**URL:** <https://community.sonarsource.com/t/sonarcloud-azure-devops-github-integration-not-reporting-to-github-pr/38053>\
**Category:** SonarQube Cloud\
**Created:** [February 4, 2021, 8:58am UTC](https://community.sonarsource.com/t/sonarcloud-azure-devops-github-integration-not-reporting-to-github-pr/38053 "2021-02-04T08:58:33Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mujo\_Hadzimehanovic](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/mujo_hadzimehanovic/32/18943_2.png) [@Mujo\_Hadzimehanovic](https://community.sonarsource.com/u/Mujo_Hadzimehanovic)\
**Post date:** [February 4, 2021, 8:58am UTC](https://community.sonarsource.com/t/sonarcloud-azure-devops-github-integration-not-reporting-to-github-pr/38053/1 "2021-02-04T08:58:33Z")

</div>

Hi,

I am using SonarCloud integration with Azure DevOps and Github, and DevOps pipeline was set to do the Java code coverage on every PR. Expected behaviour was after every PR SonarCloud reported to Github PR with info about Code coverage etc… But last 7-8 days we have experienced SonarCloud analysis not reporting to Github. When I check the analyzed branch on SonarCloud, I cannot see **See the PR** link. In order run analysis, I just use **sonarQubeRunAnalysis: true** in my Maven build. Github is integrated with SonarCloud by using Integrations on Github and Azure DevOps is connected by using service connection. I am wondering what could cause this behaviour.

---

<div class="post-metadata">

**Author:** ![Marcin\_Majewski](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/marcin_majewski/32/15358_2.png) [@Marcin\_Majewski](https://community.sonarsource.com/u/Marcin_Majewski)\
**Post date:** [February 4, 2021, 9:01am UTC](https://community.sonarsource.com/t/sonarcloud-azure-devops-github-integration-not-reporting-to-github-pr/38053/2 "2021-02-04T09:01:54Z")

</div>

Hi @Mujo_Hadzimehanovic,

Can you share the background task id of the analysis that was not reported to GitHub?

Best,  
Marcin

---

<div class="post-metadata">

**Author:** ![Mujo\_Hadzimehanovic](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/mujo_hadzimehanovic/32/18943_2.png) [@Mujo\_Hadzimehanovic](https://community.sonarsource.com/u/Mujo_Hadzimehanovic)\
**Post date:** [February 4, 2021, 9:14am UTC](https://community.sonarsource.com/t/sonarcloud-azure-devops-github-integration-not-reporting-to-github-pr/38053/3 "2021-02-04T09:14:58Z")

</div>

Hi, thanks for the answer. Here is the background task id: AXdo0VwS76C-3aJpS4iZ

---

<div class="post-metadata">

**Author:** ![Marcin\_Majewski](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/marcin_majewski/32/15358_2.png) [@Marcin\_Majewski](https://community.sonarsource.com/u/Marcin_Majewski)\
**Post date:** [February 4, 2021, 1:21pm UTC](https://community.sonarsource.com/t/sonarcloud-azure-devops-github-integration-not-reporting-to-github-pr/38053/5 "2021-02-04T13:21:02Z")

</div>

Hi @Mujo_Hadzimehanovic ,

It looks like your organization is not bound to GitHub. Did you accidentally uninstall the Sonarcloud application in GitHub? In order to have decoration you have to bind it, you can still do it by going to Administration → Organization Settings → Bind this organization to GitHub.

You also have to remove the setting on the project level, where you Azure DevOps as the provider. If you want to have decoration in GitHub you have to reset this setting as the Azure DevOps is not a provider in this case, as the repository and pull requests are hosted in GitHub.

When executing the analysis remember to put: sonar.pullrequest.github.repository and sonar.pullrequest.provider properties. I see you already did that in the previous analyses.

Let me know if it works for you or you have any other questions.

Best,  
Marcin

---

<div class="post-metadata">

**Author:** ![Mujo\_Hadzimehanovic](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/mujo_hadzimehanovic/32/18943_2.png) [@Mujo\_Hadzimehanovic](https://community.sonarsource.com/u/Mujo_Hadzimehanovic)\
**Post date:** [February 4, 2021, 2:03pm UTC](https://community.sonarsource.com/t/sonarcloud-azure-devops-github-integration-not-reporting-to-github-pr/38053/6 "2021-02-04T14:03:30Z")

</div>

Hi @Marcin_Majewski

Our organization is bound to Azure DevOps and it worked before 7 days like this. Regarding Github, we have just Github integration with SonarCloud. I have removed the project level Azure DevOps setting, but still not working.

---

<div class="post-metadata">

**Author:** ![Marcin\_Majewski](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/marcin_majewski/32/15358_2.png) [@Marcin\_Majewski](https://community.sonarsource.com/u/Marcin_Majewski)\
**Post date:** [February 4, 2021, 2:23pm UTC](https://community.sonarsource.com/t/sonarcloud-azure-devops-github-integration-not-reporting-to-github-pr/38053/7 "2021-02-04T14:23:00Z")

</div>

Hi @Mujo_Hadzimehanovic,

Maybe I misunderstood your use-case. Can you confirm the following points, so I can help you better:

- You run the sonar analysis in Azure DevOps pipeline
- You host your repository on GitHub
- You expect to have decoration (check + comment) on the GitHub Pull Requests

Best,  
Marcin

---

<div class="post-metadata">

**Author:** ![Mujo\_Hadzimehanovic](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/mujo_hadzimehanovic/32/18943_2.png) [@Mujo\_Hadzimehanovic](https://community.sonarsource.com/u/Mujo_Hadzimehanovic)\
**Post date:** [February 4, 2021, 2:29pm UTC](https://community.sonarsource.com/t/sonarcloud-azure-devops-github-integration-not-reporting-to-github-pr/38053/8 "2021-02-04T14:29:06Z")

</div>

Yes, you are correct. Sonar check is executed from DevOps pipeline. Code is on Github and we expect check + comment on Github PR.

---

<div class="post-metadata">

**Author:** ![Marcin\_Majewski](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/marcin_majewski/32/15358_2.png) [@Marcin\_Majewski](https://community.sonarsource.com/u/Marcin_Majewski)\
**Post date:** [February 4, 2021, 3:43pm UTC](https://community.sonarsource.com/t/sonarcloud-azure-devops-github-integration-not-reporting-to-github-pr/38053/9 "2021-02-04T15:43:43Z")

</div>

Hi,

Ok. Can you check if you have SonarCloud app installed in your organization [https://github.com/settings/installations/](https://github.com/settings/installations/) ?

Best,  
Marcin

---

<div class="post-metadata">

**Author:** ![Mujo\_Hadzimehanovic](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/mujo_hadzimehanovic/32/18943_2.png) [@Mujo\_Hadzimehanovic](https://community.sonarsource.com/u/Mujo_Hadzimehanovic)\
**Post date:** [February 5, 2021, 8:45am UTC](https://community.sonarsource.com/t/sonarcloud-azure-devops-github-integration-not-reporting-to-github-pr/38053/10 "2021-02-05T08:45:28Z")

</div>

Hi @Marcin_Majewski ,  
I can confirm that we have SonarCloud application installed in our organization and bound to repository. Here is a link which we have followed in order to setup: [https://sonarcloud.io/documentation/analysis/scan/sonarscanner-for-azure-devops/](https://sonarcloud.io/documentation/analysis/scan/sonarscanner-for-azure-devops/). And also the image which confirms SonarCloud application in Github.

 ![github](https://europe1.discourse-cdn.com/sonarsource/uploads/sonarcommunity/original/3X/b/1/b142af5e4dcca3c778772239d0986f620e2d690d.jpeg)

---

<div class="post-metadata">

**Author:** ![Marcin\_Majewski](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/marcin_majewski/32/15358_2.png) [@Marcin\_Majewski](https://community.sonarsource.com/u/Marcin_Majewski)\
**Post date:** [February 5, 2021, 1:18pm UTC](https://community.sonarsource.com/t/sonarcloud-azure-devops-github-integration-not-reporting-to-github-pr/38053/11 "2021-02-05T13:18:33Z")

</div>

Hi @Mujo_Hadzimehanovic,

It seems there is some issue with the Github installation. I suggest doing the following:

1. Uninstall SonarCloud app from GitHub
2. Go to organization administration and click on “Choose the organization on GitHub” (in “Bind the organization to GitHub”):  
 ![image](https://europe1.discourse-cdn.com/sonarsource/uploads/sonarcommunity/original/3X/b/1/b174c07cb9eda4b10fd03d34b69ac684bff8efa6.png) .  
This will install the GitHub application again.

This should fix the issue. Let me know if it works for you.

Best,  
Marcin

---

<div class="post-metadata">

**Author:** ![Mujo\_Hadzimehanovic](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/mujo_hadzimehanovic/32/18943_2.png) [@Mujo\_Hadzimehanovic](https://community.sonarsource.com/u/Mujo_Hadzimehanovic)\
**Post date:** [February 5, 2021, 2:46pm UTC](https://community.sonarsource.com/t/sonarcloud-azure-devops-github-integration-not-reporting-to-github-pr/38053/12 "2021-02-05T14:46:04Z")

</div>

Hi @Marcin_Majewski ,

We cannot Bind the organization to GitHub as our organization is already bound to Azure DevOps. Sending a screenshot of our Organization settings.

 ![azure devops connection](https://europe1.discourse-cdn.com/sonarsource/uploads/sonarcommunity/original/3X/6/2/621f29bd1cb6e60477fa5bbccb091678483e1e0e.png)

---

<div class="post-metadata">

**Author:** ![Marcin\_Majewski](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/marcin_majewski/32/15358_2.png) [@Marcin\_Majewski](https://community.sonarsource.com/u/Marcin_Majewski)\
**Post date:** [February 5, 2021, 3:46pm UTC](https://community.sonarsource.com/t/sonarcloud-azure-devops-github-integration-not-reporting-to-github-pr/38053/15 "2021-02-05T15:46:10Z")

</div>

Hi @Mujo_Hadzimehanovic ,

Did you sign in into the Sonarcloud using Github or Azure Devops account?

Best,  
Marcin

---

<div class="post-metadata">

**Author:** ![Mujo\_Hadzimehanovic](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/mujo_hadzimehanovic/32/18943_2.png) [@Mujo\_Hadzimehanovic](https://community.sonarsource.com/u/Mujo_Hadzimehanovic)\
**Post date:** [February 5, 2021, 3:49pm UTC](https://community.sonarsource.com/t/sonarcloud-azure-devops-github-integration-not-reporting-to-github-pr/38053/16 "2021-02-05T15:49:20Z")

</div>

Hi @Marcin_Majewski ,

We have signed into the Sonarcloud by using Azure Devops account.

---

<div class="post-metadata">

**Author:** ![Mujo\_Hadzimehanovic](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/mujo_hadzimehanovic/32/18943_2.png) [@Mujo\_Hadzimehanovic](https://community.sonarsource.com/u/Mujo_Hadzimehanovic)\
**Post date:** [February 9, 2021, 9:35am UTC](https://community.sonarsource.com/t/sonarcloud-azure-devops-github-integration-not-reporting-to-github-pr/38053/21 "2021-02-09T09:35:15Z")

</div>

Hi @Marcin_Majewski ,

Any updates on this ? I just tried to set everything up from scratch and test, still not working.

---

<div class="post-metadata">

**Author:** ![Marcin\_Majewski](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/marcin_majewski/32/15358_2.png) [@Marcin\_Majewski](https://community.sonarsource.com/u/Marcin_Majewski)\
**Post date:** [February 10, 2021, 4:20pm UTC](https://community.sonarsource.com/t/sonarcloud-azure-devops-github-integration-not-reporting-to-github-pr/38053/22 "2021-02-10T16:20:18Z")

</div>

I took a look into the issue and you are not receiving PR comments and check on GitHub because your organization is bound to Azure. It might have worked before, as you can install the SonarCloud app without going through the onboarding process in the web application, but it was not intended to. There is no need for having org bound to Azure unless you host your code in Azure DevOps. The following steps will allow you to bind your org to GitHub and allow PR decoration to correctly decorate.

As the prerequisite, we will delete the current binding of organization to the Azure DevOps. Do you agree to that?

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

Does it sound good to you?

---

<div class="post-metadata">

**Author:** ![Mujo\_Hadzimehanovic](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/mujo_hadzimehanovic/32/18943_2.png) [@Mujo\_Hadzimehanovic](https://community.sonarsource.com/u/Mujo_Hadzimehanovic)\
**Post date:** [February 11, 2021, 8:37am UTC](https://community.sonarsource.com/t/sonarcloud-azure-devops-github-integration-not-reporting-to-github-pr/38053/23 "2021-02-11T08:37:27Z")

</div>

I just want to check if we do everything from the list above, can we do it without removing our existing project, since we have analysis history there and we cannot afford to lose the project ?

---

<div class="post-metadata">

**Author:** ![Marcin\_Majewski](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/marcin_majewski/32/15358_2.png) [@Marcin\_Majewski](https://community.sonarsource.com/u/Marcin_Majewski)\
**Post date:** [February 11, 2021, 11:08am UTC](https://community.sonarsource.com/t/sonarcloud-azure-devops-github-integration-not-reporting-to-github-pr/38053/24 "2021-02-11T11:08:07Z")

</div>

There is no need for removal of the existing project. The steps above are only changing ownership and binding on the organization level, there are meant to migrate without need to remove org or projects. The projects will remain as they are.

---

<div class="post-metadata">

**Author:** ![Mujo\_Hadzimehanovic](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/mujo_hadzimehanovic/32/18943_2.png) [@Mujo\_Hadzimehanovic](https://community.sonarsource.com/u/Mujo_Hadzimehanovic)\
**Post date:** [February 11, 2021, 11:43am UTC](https://community.sonarsource.com/t/sonarcloud-azure-devops-github-integration-not-reporting-to-github-pr/38053/25 "2021-02-11T11:43:32Z")

</div>

Sounds good then, you can proceed with deleting current binding to Azure DevOps. Organization name is “shipexinc”. Just let me know when it is done, so we can proceed with further steps.

---

<div class="post-metadata">

**Author:** ![Marcin\_Majewski](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/marcin_majewski/32/15358_2.png) [@Marcin\_Majewski](https://community.sonarsource.com/u/Marcin_Majewski)\
**Post date:** [February 12, 2021, 1:29pm UTC](https://community.sonarsource.com/t/sonarcloud-azure-devops-github-integration-not-reporting-to-github-pr/38053/26 "2021-02-12T13:29:07Z")

</div>

@Mujo_Hadzimehanovic The binding was removed. You can proceed with the steps.

---

<div class="post-metadata">

**Author:** ![Mujo\_Hadzimehanovic](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/mujo_hadzimehanovic/32/18943_2.png) [@Mujo\_Hadzimehanovic](https://community.sonarsource.com/u/Mujo_Hadzimehanovic)\
**Post date:** [February 12, 2021, 3:05pm UTC](https://community.sonarsource.com/t/sonarcloud-azure-devops-github-integration-not-reporting-to-github-pr/38053/27 "2021-02-12T15:05:13Z")

</div>

Seems like it is working now, thanks @Marcin_Majewski .

[Next page](https://community.sonarsource.com/t/sonarcloud-azure-devops-github-integration-not-reporting-to-github-pr/38053.md?page=2)
