Add PR summary to Github when building on BuildKite


Our current setup is that we have our source code stored on Github but use BuildKite for CI. I have setup BuildKite to successfully scan the code using the docker image:

- name: ":sonarcloud: SC Scan"
      - docker#v5.7.0:
          image: "sonarsource/sonar-scanner-cli:4"
            - "SONAR_TOKEN=XXXX"
            - "SONAR_HOST_URL="

In SonarCloud, my org is bound to Github and in the SC project, Pull Request summary is enabled.

I would expect to see Pull Request decoration in Github but I am not. Is it possible to get PR decoration when building in a separate CI? is there an additional setting i need to set?


Is your project in SonarCloud “bound” to your project in GitHub? In order for SonarCloud to reach back to GitHub to update it with analysis results, it needs to know where to “reach”. And it needs to have permissions in GitHub to be able to do that.

So this isn’t about your CI. It’s mainly about initial project setup in SonarCloud.



Yes the project is bound to github:

other projects in my org which do use github actions or automatic analysis are able to write the PR decoration

this is my file:

# Required Properties
sonar.projectKey = AvantFinCo_avant-templates
sonar.organization = avantfinco

# Optional Properties

sonar.projectName = avant-templates
# See here for details how to setup file patterns:
sonar.sources = .
# exclude test files, auto-generated files here
sonar.exclusions = **/spec/**/*
sonar.tests = spec/
sonar.projectVersion = Initial

sonar.ruby.coverage.reportPaths = coverage/coverage.json
sonar.coverage.exclusions = config/, db/, spec/


And when you look at the project, do you see any warnings on its homepage?


just this:



Thanks for the screenshot. One last question before I call in the big guns: when you look at the analysis in SonarCloud, it is presented as a PR analysis or as a branch analysis?

I.e. are you explicitly passing in the PR analysis parameter/value pairs?


i believe its showing up as a branch analysis. what are the PR analysis parameter/value pairs?


Here you go: