which versions are you using (SonarQube Enterprise 8.1, Scanner 4, Plugin, and any relevant extension)
what are you trying to achieve
Pull request decoration with Bitbucket server
what have you tried so far to achieve this
PR Decoration requires passing the below information to sonarscanner (as per the documentation here )
Parameter Name
Description
sonar.pullrequest.key
Unique identifier of your PR. Must correspond to the key of the PR in GitHub or Azure DevOps. e.g.: sonar.pullrequest.key=5
sonar.pullrequest.branch
The name of the branch that contains the changes to be merged. e.g.: sonar.pullrequest.branch=feature/my-new-feature
sonar.pullrequest.base
The branch into which the PR will be merged. Default: master e.g.: sonar.pullrequest.base=master
I have been able to achieve pull request decoration in test configurations after hard coding the above information in my build step. How can we receive those information automatically for every PR?
What CI tool are you typically using (Jenkins? Travis? Something else?) – for many tools, this is done automatically by detecting environment variables related to your pull request.