GitHub Commit Decoration

I’ve successfully implemented PR Decoration with Circle CI and GitHub:
Screenshot 2019-08-07 at 18.33.56.png

Nevertheless, I am not able to decorate commits on my main branch (master) or other branches. There’s nothing displayed even though everything is analyzed on sonarcloud.io. Unfortunately, I even could not find any information about that in the documentation.

Basicly that’s my code regarding each anlysis (the project stuff is done via properties):

        if [ -v CIRCLE_PULL_REQUEST ] && [ "$CIRCLE_BRANCH" != "master" ]; then
          ./gradlew sonarqube \
            -Dsonar.pullrequest.base=master \
            -Dsonar.pullrequest.branch="${CIRCLE_BRANCH}" \
            -Dsonar.pullrequest.key="${pr_number}"
        else
          if [ "$CIRCLE_BRANCH" != "master" ]; then
            ./gradlew sonarqube \
              -Dsonar.branch.name="${CIRCLE_BRANCH}"
          else
            ./gradlew sonarqube
          fi
        fi

In your screenshot I see the SonarCloud Code Analysis check. What do you see when you click on the Details link of that check?

All I want to see. But it just happens for PRs. I don’t see the Analysis check for normal commits neither in my main branch master nor in any other branch.

Indeed SonarCloud decorates with GitHub Checks only pull requests. Analyses you run on branches will not create GitHub Checks.

Hi,

I spent quite some time to find out that indeed making a build fail (github actions) withtout PR is impossible.

It is a bit disappointing for a team that does not want/need to do PR but still would like to enforce code quality.

Is that by design or because of technicalities ?