Importing GitHub repositories
Importing your GitHub repositories into SonarQube Server.
Once the integration of SonarQube Server with GitHub has been set up , you can import a GitHub repository to create the corresponding project in SonarQube Server. The so-created SonarQube Server project is "bound" to its GitHub repository. With a bound project:
- You can see in the SonarQube Server UI with which repository the project is associated. 
- The quality gate status report to GitHub on pull requests is automatically set up. 
- You can set up report of security alerts, see Setting up the report of security alerts for more details. 
To import a GitHub repository into SonarQube Server, do one of the following:
- Import the GitHub repository from the SonarQube Server UI: see below. You need access to the GitHub repository and you need the Create Projects permission in SonarQube Server. 
- Analyze a repository from a GitHub action. SonarQube Server will create the corresponding project in SonarQube Server and will automatically bind it to the GitHub repository if it finds a matching GitHub integration configuration in its database. See Adding analysis to GitHub Actions workflow for more information. 
Importing GitHub repositories
To import GitHub repositories into SonarQube Server:
- In the top navigation bar of SonarQube Server, select the Projects tab. 
- In the top right corner, select the Create Project > Import from DevOps platforms button. 
- In the Import from GitHub section, select Setup. The GitHub project onboarding page opens. 
- In the GitHub project onboarding page, select the GitHub organization and then the repository(ies) you want to import. 
- Select the Import button. The Clean as You Code setting page opens. 
- Select the new code definition option. 
- Select the Create projects button. 
Importing a GitHub monorepo
Starting in Enterprise Edition, you can import a GitHub monorepo. See Managing monorepo projects for more information.
Was this helpful?

