Set default main branch name for new branch in SonarQube Data Center Edition

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
  • how is SonarQube deployed: zip, Docker, Helm
  • what are you trying to achieve
  • what have you tried so far to achieve this

Data Center Edition Version 9.9.4 (build 87374)

Is there any way to set the ‘Project Creation / default main branch name’ per Github Enterprise org in Data Center Edition?

I have been using Developer Edition where I set sonar.projectCreation.mainBranchName to ‘master’ in Administration / General Settings, but now I am migrating a bunch of reps to DCE where the default is ‘main’ branch, so I have to do a bunch of faffing after first scan / project creation to change ‘MAIN BRANCH’ to ‘master’ for each repo.

Is there a per-org setting that I can get the DCE admin to configure for me that would change that?

Thanks, /Dave.

Hey there.

It’s not possible to get a default any more granular than the entire SonarQube instance.

With DCE, you surely have access to Sonar Commercial Support. I think they’d be happy to help discuss options to ease the transition. :slight_smile: