Bitbucket server PR decorator fails to use scanner properties


I tried running Sonar to decorate bitbucket server pull requests, but I can’t seem to get the properties to apply. When executing dotnet sonarscanner begin ... I provide the options using /d properties:

/d:sonar.pullrequest.bitbucketserver.serverUrl="" \
    /d:sonar.pullrequest.provider="Bitbucket Server" \
    /d:sonar.pullrequest.bitbucketserver.token.secured="$BITBUCKET_JWT" \
    /d:sonar.pullrequest.bitbucketserver.project="$PR_PROJECT" \
    /d:sonar.pullrequest.bitbucketserver.repository="$PR_REPOSITORY_SLUG" \

and they seem to be show as well in the scanner context

Project scanner properties:
  - sonar.pullrequest.bitbucketserver.project=xxx
  - sonar.pullrequest.bitbucketserver.repository=xxx
  - sonar.pullrequest.bitbucketserver.serverUrl=
  - sonar.pullrequest.bitbucketserver.token.secured=******

but the task still shows a warning that it was not supplied:

Pull request decoration did not happen. Configuration missing to decorate the Bitbucket Server pull request: BitbucketServerPrConfiguration{serverUrl=null, project='xxx', repository='xxx', id=13, headSha='xxx', token=null}

Do those settings have to be set in the UI? Can they not be provided using scanner properties?

Indeed, these can’t be set as analysis parameters. They can only be configured through the Global / Project Administration UI.

Does that also mean they cannot be set within They don’t seem to be picking up at least. How are we to automate the setup of the PR decoration?

Hi @SinisterMinister,

Either by updating to the SQ 8.2 and creating your project from the UI by selecting a BitBucket Server or by calling the webAPI api/alm_integrations/import_bitbucketserver_project.