Having multiple long-lived branches on GitHub

I am using SonarCloud with sonar-scanner to analyse projects on GitHub.

We run sonar-scanner via Travis CI every time we do a Pull request.

Since we are using a GitFlow workflow, we have 2 long-lived branches, master and develop, with a myriad of short-lived branches that get merged into develop periodically, and develop is merged ~weekly to master.

On SonarCloud, in the -> Administation -> Branches & Pull Requests section I have set the detection pattern for long-lived branches to: (master|develop).*

However, I only see the main branch master. So this blocks me from using sonar-scanner to merge features into develop. If I rename the main branch to develop, I’m able to merge feature branches into develop, but merging from develop to master breaks.

Please help!

P.S. I’m not able to see any branches beyond the main one, for any of my projects. It’s as if none of the branches (short- or long-lived) are detected on GitHub.

Hi,

The sonar-scanner won’t automatically pickup the git branch that is being analyzed.
Are you passing the appropriate parameters to the scanner?

More information can be found here for PRs and here for branches.

I think issue is that SonarQube project was created after Develop branch existed, and thus updating the RegEx does not have an impact on its status as long-lived, unfortunately.