# Github Enterprise PR Decoration with SonarQube Developer Edition

**URL:** <https://community.sonarsource.com/t/github-enterprise-pr-decoration-with-sonarqube-developer-edition/16053>\
**Category:** SonarQube Server / Community Build\
**Created:** [October 30, 2019, 9:33am UTC](https://community.sonarsource.com/t/github-enterprise-pr-decoration-with-sonarqube-developer-edition/16053 "2019-10-30T09:33:45Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Deepak\_Dinakaran](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/deepak_dinakaran/32/7294_2.png) [@Deepak\_Dinakaran](https://community.sonarsource.com/u/Deepak_Dinakaran)\
**Post date:** [October 30, 2019, 9:33am UTC](https://community.sonarsource.com/t/github-enterprise-pr-decoration-with-sonarqube-developer-edition/16053/1 "2019-10-30T09:33:45Z")

</div>

**Version used:** Github Enterprise Version 2.16.4, SonarQube Developer EditionVersion 8.0

**Trying To achieve:** PR decoration as per this [link](https://github.com/SonarSource/sonar-training-examples/pull/56). This is where developers can have an auto trigger of checks on Github as per PR.

**Tried so far:** Have a repo with master and feature branch. Already did configuration as per this [link](https://docs.sonarqube.org/latest/analysis/pull-request/) and this [link](https://docs.sonarqube.org/latest/instance-administration/github-application/) Ran analysis on master branch using below:  
`mvn sonar:sonar -Dsonar.projectKey=sonarqube-pr-sample -Dsonar.host.url=http://xxxxxxxx -Dsonar.login=xxxxxx`

After this ran analysis on feature branch as per below:  
`mvn sonar:sonar -Dsonar.projectKey=sonarqube-pr-sample -Dsonar.host.url=http://51.137.207.209 -Dsonar.login=fdad66234ae884919aa9912f91234d435334f5ce -Dsonar.pullrequest.branch=sample-feature -Dsonar.pullrequest.key=1 `

Got the results as per below screenshots

 ![14%20PM](https://europe1.discourse-cdn.com/sonarsource/uploads/sonarcommunity/original/2X/4/4b093e14bbf9c068f15717eebeb95a144e160a09.png)

Looking for a solution to enable Github PR checks

---

<div class="post-metadata">

**Author:** ![julienlancelot](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/julienlancelot/32/68225_2.png) [@julienlancelot](https://community.sonarsource.com/u/julienlancelot)\
**Post date:** [October 30, 2019, 2:59pm UTC](https://community.sonarsource.com/t/github-enterprise-pr-decoration-with-sonarqube-developer-edition/16053/2 "2019-10-30T14:59:33Z")

</div>

Hi @Deepak_Dinakaran, and welcome to this forum !

As you can see in your screenshot, in the Background Tasks page the last analysis of the PR (demo / 1) has failed.  
You need to check content of the error logs by clicking on the wheel on the right of the task.

Regards

---

<div class="post-metadata">

**Author:** ![Deepak\_Dinakaran](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/deepak_dinakaran/32/7294_2.png) [@Deepak\_Dinakaran](https://community.sonarsource.com/u/Deepak_Dinakaran)\
**Post date:** [October 30, 2019, 4:05pm UTC](https://community.sonarsource.com/t/github-enterprise-pr-decoration-with-sonarqube-developer-edition/16053/3 "2019-10-30T16:05:47Z")

</div>

Hi @julienlancelot,

Thanks for the reply. I agree. But what I am trying to achieve is as per this link([https://github.com/SonarSource/sonar-training-examples/pull/56](https://github.com/SonarSource/sonar-training-examples/pull/56)) Please see the screenshot below. The query is how and what should I configure for Pull Request Analysis with PR Decoration on Github.

 ![07%20PM](https://europe1.discourse-cdn.com/sonarsource/uploads/sonarcommunity/original/2X/c/cdc81ec953bc871537166e4b0e59eb775add1a5c.png)

Hope this clarifies the query.

---

<div class="post-metadata">

**Author:** ![julienlancelot](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/julienlancelot/32/68225_2.png) [@julienlancelot](https://community.sonarsource.com/u/julienlancelot)\
**Post date:** [October 31, 2019, 8:58am UTC](https://community.sonarsource.com/t/github-enterprise-pr-decoration-with-sonarqube-developer-edition/16053/4 "2019-10-31T08:58:06Z")

</div>

I totally understand your query, and what I’m trying to tell you is that the PR decoration is not working because the PR analysis made by SonarQube is failing in your Background Tasks.

In order to solve this issue you need to check which error is reported in the task.

---

<div class="post-metadata">

**Author:** ![Deepak\_Dinakaran](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/deepak_dinakaran/32/7294_2.png) [@Deepak\_Dinakaran](https://community.sonarsource.com/u/Deepak_Dinakaran)\
**Post date:** [October 31, 2019, 10:11am UTC](https://community.sonarsource.com/t/github-enterprise-pr-decoration-with-sonarqube-developer-edition/16053/5 "2019-10-31T10:11:45Z")

</div>

Hi @julienlancelot,

Apologies. Please see attached log file.  
[sonarqube.txt](https://community.sonarsource.com/uploads/short-url/r3YQ2SUwYBASMFUJ7QZeOkPfkTL.txt) (4.6 KB)

Please advice.

Thanks  
Deepak Dinakaran

---

<div class="post-metadata">

**Author:** ![julienlancelot](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/julienlancelot/32/68225_2.png) [@julienlancelot](https://community.sonarsource.com/u/julienlancelot)\
**Post date:** [October 31, 2019, 10:13am UTC](https://community.sonarsource.com/t/github-enterprise-pr-decoration-with-sonarqube-developer-edition/16053/6 "2019-10-31T10:13:34Z")

</div>

So, as you can see in the file, the error is :

> Caused by: java.lang.IllegalStateException: The property ‘sonar.alm.github.app.id’ is not an long value: For input string: “Iv1.5467be83b3be01b6”

---

<div class="post-metadata">

**Author:** ![Deepak\_Dinakaran](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/deepak_dinakaran/32/7294_2.png) [@Deepak\_Dinakaran](https://community.sonarsource.com/u/Deepak_Dinakaran)\
**Post date:** [October 31, 2019, 11:16am UTC](https://community.sonarsource.com/t/github-enterprise-pr-decoration-with-sonarqube-developer-edition/16053/7 "2019-10-31T11:16:51Z")

</div>

Hi @julienlancelot,

All good now. Thanks. Post scan I have some missing icons. Is there a fix for the below. On copying the image address I got this **[http://127.0.0.1:9000/static/developer-server/checks/QualityGateBadge/failed.svg](http://127.0.0.1:9000/static/developer-server/checks/QualityGateBadge/failed.svg)**

 ![image](https://europe1.discourse-cdn.com/sonarsource/uploads/sonarcommunity/original/2X/5/5a9acc335612f37e0a5d9201d9aaebc026427f04.png)

Please advise  
Deepak Dinakaran

---

<div class="post-metadata">

**Author:** ![julienlancelot](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/julienlancelot/32/68225_2.png) [@julienlancelot](https://community.sonarsource.com/u/julienlancelot)\
**Post date:** [October 31, 2019, 1:13pm UTC](https://community.sonarsource.com/t/github-enterprise-pr-decoration-with-sonarqube-developer-edition/16053/8 "2019-10-31T13:13:22Z")

</div>

You need to specify the public URL of your SonarQube instance by setting it in **Administration** \> **Configuration** \> **General Settings** \> **Server base URL**.

---

<div class="post-metadata">

**Author:** ![Deepak\_Dinakaran](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/deepak_dinakaran/32/7294_2.png) [@Deepak\_Dinakaran](https://community.sonarsource.com/u/Deepak_Dinakaran)\
**Post date:** [November 1, 2019, 4:49am UTC](https://community.sonarsource.com/t/github-enterprise-pr-decoration-with-sonarqube-developer-edition/16053/9 "2019-11-01T04:49:12Z")

</div>

Hi @julienlancelot,

Thank you. This partially fixed it. Presently the Server base URL is updated. The link does work. However the images on the screenshot sent earlier is not updated and are still shown in github as broken images. On extracting of the image URL it works successfully.

 ![image](https://europe1.discourse-cdn.com/sonarsource/uploads/sonarcommunity/original/2X/4/431e5e712ba03d0b299feb4a658d2472b8050ad0.png)

Is there a fix or suggestion for this.

Thanks  
Deepak Dinakaran

---

<div class="post-metadata">

**Author:** ![julienlancelot](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/julienlancelot/32/68225_2.png) [@julienlancelot](https://community.sonarsource.com/u/julienlancelot)\
**Post date:** [November 1, 2019, 8:10am UTC](https://community.sonarsource.com/t/github-enterprise-pr-decoration-with-sonarqube-developer-edition/16053/10 "2019-11-01T08:10:55Z")

</div>

It may be a caching issue of your browser.  
Please on another internet browser or in a private session.
