We are currently trying out SonarCloud in 3 of our GitHub repos, 2 Java with Maven and 1 JavaScript/TypeScript repos. When creating PR’s SonarCloud finds the PR’s correctly and is able to scan them, but we are having issues with pull request decoration not showing up in the PR. And cant see any error’s anywhere.
This is how the PR looks in SonarCloud:
Screenshot of GitHub pull request:
Our GitHub Action looks like this:
name: "Code Quality Scan"
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
jobs:
build:
if: github.actor != 'dependabot[bot]'
name: Build and analyze
runs-on: ubuntu-latest
steps:
- name: Checkout the repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up the Java JDK
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: "17"
- name: Build and analyze
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=[MASKED] -Dsonar.organization=[MASKED] -Dsonar.host.url=https://sonarcloud.io
We have only granted permission to the 3 repos and not the entire GitHub org if that matters, and this is what it looks like:
I have also tried to look at other’s here having the same issues, but without any luck. Anyone have any ideas on what to try?