Main branch not is recognize

I’m running sonarqube (enterprise edition) analysis with github actions.
The pullrequest branch are detected normally, but the main branch is not.
We working on “main” branch instead of “master”, however sonarqube show “master” as main branch followed by the error message:

“master” branch has not been analyzed yet and you have multiple branches already. It looks like it is not your Main Branch, check your configuration.

At the moment, I don’t have access to manage sonarqube, but I need assistant to identify if I need rename the main branch in sonarqube settings to solve this issue, or add some specifically parameter to run the analysis.


Hey there.

As of SonarQube v10.2 – project administrators can change the main branch of their SonarQube project from the Project Settings > Branches section of their project! Branches can be renamed here as well ()in any version).