Add new long-lived branches

At the moment in the sonarcloud ui i see only develop as a long-lived branch.

I would like to see, additionally, the master branch and all the release/* branches.
I tried to change the regex pattern to: (develop|release/|master).* but i still see the develop branch only.

In my github ci/cd the scan run on every branch, so i don’t get why i just see the develop branch only


You can’t find the other branches anywhere in the SonarCloud interface? Not under branches? Not under PRs?

If that’s the case, then you really need to look at your CI logs because it appears that analysis either isn’t running or it isn’t being submitted to SonarCloud.



I see all ma PRs branches and my main branch (develop)

After our last release that happened yesterday (we use git-flow pattern), we started to see our master. long lived branch.

we just don’t see our releases long lived branches. but i guess the reason is because we create PRs for merging ours release/x.y.z branches into master. so they appear in the PRs section only.

Could be that the reason?

Another question/advice:

With git-flow pattern, does it make sense to have master as a long lived branch ? or just the develop branch should be enough? Im asking because in develop we can see in the activity every metric evolving version by version as well. (we use as a new code “since the previous version option”)


Generally we try to keep it to one question per thread. Otherwise it can get messy, fast. Nonetheless…

Ehm… I don’t see any reason not to.

I think for this you need to go back to your job logs and see what’s being analyzed. I would start by making sure that analysis is included in the pipeline for every branch & PR. Once that’s established, we can dig in further.


yes i get the analysis for each of my pull request.

As far as i remember, i read in your documentation that if a branch is used as a pull request for being merged in another branch, then you will not see that particular branch as a long-lived one (even if there is a match in the regex pattern)


Is this related to automatic analysis? Because if you’re running an analysis, I would expect to see it in SonarCloud.


No is not an automatic analysis, i ve my own ci/cd.

the analysis is triggered from my ci/cd job for each pull request for develop and master AND for each push on develop and master.

when i ve a pull request to merge a release into master, i see the release branch in the PRs section but not as a long-lived branch.


What you haven’t said here is “analysis is triggered for each commit on the release branch”.


as soon as i open a pull request from a release branch to merge into master, then the analysis start for each commit of that particular pull request.

however the github action event is pull_request instead of push


It sounds like you need to modify your pipeline then.