Search code examples
githubsonarqubegithub-actionssonarqube-7.9

Decorating the pull request in GitHub with SonarQube (Community Edition)


Firstly I created SonarQube Server (Community Edition) and I integrated sonarQube with Github for scanning the code of the GitHub.

Then, I Created action in GitHub to run the sonarQube

.github/workflows/python-pull.yml

 run: sonar-scanner
          -Dsonar.host.url=${{ secrets.SONAR_URL }}
          -Dsonar.login=${{ secrets.SONAR_TOKEN }}
          -Dsonar.projectKey=${{ secrets.SONAR_PROJECT_KEY }}
          -Dsonar.pullrequest.key=${{ github.event.number }}
          -Dsonar.pullrequest.branch=${{ github.HEAD_REF }}
          -Dsonar.pullrequest.base=${{ github.BASE_REF }}
          -Dsonar.pullrequest.github.repository=${{ github.repository }}
          -Dsonar.scm.provider=git
          -Dsonar.java.binaries=/tmp

The result of GitHub actions In this image, It showed only "All checks have passed"

Whenever I do push or pull in the GitHub so sonarQube server shows all the bugs, errors, Vulnerabilities, etc.Like this

But my requirement is: I want all details of the code will display on the GitHub page which is shows in Sonarqube Server (Like bugs and errors)

And also let me know that Is it possible in the community Edition of sonarQube?


Solution

  • Decorating Pull Request is for Developer edition or above.

    But you can use unofficial release sonarqube-community-branch-plugin

    Install this plugin and then you can refer to documentation for further configuration.