Latest | DevOps platform integration | GitHub integration | Setting up your projects

Was this page helpful?

On this page

Start Free

Setting up your GitHub projects in SonarQube

For general information about project creation and import, see Creating and importing projects.

Reporting your quality gate status in GitHub

After creating and installing your GitHub App, SonarQube can report your quality gate status and analysis metrics directly to your GitHub branches and pull requests.

To do this, add a project from GitHub by doing one of the following:

  • On the Projects Overview page, select Add projectGitHub, and follow the steps in SonarQube to analyze your project. 
  • Scan a project from a GitHub action. SonarQube will find a matching GitHub configuration.

SonarQube automatically sets the project settings required to show your quality gate in your branches and pull requests.

If you're creating your projects manually or adding quality gate reporting to an existing project, see the following section.

Reporting your quality gate status in manually created or existing projects

SonarQube can also report your quality gate status to GitHub pull requests and branches for existing and manually created projects. After you've created and installed your GitHub App and updated your global DevOps Platform Integration settings as shown in the Importing your GitHub repositories into SonarQube section above, set the following project settings at Project Settings > General Settings > DevOps Platform Integration:

  • Configuration name: The configuration name that corresponds to your GitHub instance.
  • Repository identifier: The path of your repository URL.

Showing your analysis summary under the GitHub Conversation tab

Make sure that for your project, Enable analysis summary under the GitHub Conversation tab in Project settings > General settings > Pull Request Decoration is on (default value). If it's the case, your pull request analysis will be shown under both the Conversation and Checks tabs in GitHub. When off, your pull request analysis summary is only shown under the Checks tab.

© 2008-2024 SonarSource SA. All rights reserved. SONAR, SONARSOURCE, SONARLINT, SONARQUBE, SONARCLOUD, and CLEAN AS YOU CODE are trademarks of SonarSource SA.

Creative Commons License