You can see your Pull Requests in SonarQube from the branches and pull requests dropdown menu of your project.
Pull Request analysis allows you to see your Pull Request's Quality Gate and analysis in the SonarQube interface:
Pull Request Decoration
You can also add Pull Request decoration that shows the Pull Request analysis and Quality Gate directly in your ALM's interface. See Decorating Pull Requests for more information on setting it up.
Pull Request Quality Gate
A Quality Gate lets you ensure you are meeting your organization's quality policy and that you can merge your Pull Request. The Pull Request Quality Gate:
- Focuses on new code – The PR quality gate only uses your project's quality gate conditions that apply to "on New Code" metrics.
- Assigns a status – Each PR shows a quality gate status reflecting whether it Passed or Failed.
PR analyses on SonarQube are deleted automatically after 30 days with no analysis. This can be updated in Administration > Configuration > General Settings > Housekeeping > Number of days before purging inactive branches.
These parameters enable PR analysis:
||Unique identifier of your PR. Must correspond to the key of the PR in GitHub or Azure DevOps.
||The name of the branch that contains the changes to be merged.
||The branch into which the PR will be merged.