I am using SonarQube's Developer edition (8.4) with GitHub (community edition - not enterprise) to analyze Maven based java projects. I took this sample project and followed all the steps mentioned in this guide to set up.
I have a sample build.yaml file copied from the same tutorial, for a Maven project that looks like below:
name: Build
on:
push:
branches:
- master
- develop
pull_request:
types: [opened, synchronize, reopened]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Cache SonarQube packages
uses: actions/cache@v1
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Cache Maven packages
uses: actions/cache@v1
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Build and analyze
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
Whenever a new code is pushed an analysis is done. I can see PR decorations and checks running for PRs as well in github's dashboard.
However, I am not seeing any other branches except master or any Pull Requests in SonarQube's dashboard under Branches & Pull Requests. Below are the screenshots for reference:
Branches (only master branch is visible. I have feature and develop branches too)

As per SonarQube's docs, I should be able to see multiple branches and PRs in the dashboard.
Am I missing something?
