Uploaded image for project: 'Product Roadmaps'
  1. Product Roadmaps
  2. MMF-2173

Main branch name on new project matches ALM main branch

    Details

    • Type: MMF
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Labels:
      None

      Description

      WHY

      SonarQube helps me create and analyze my project from my preferred ALM: Bitbucket Server, GitHub, GitLab and Azure DevOps.
      Still, when I import my project on SonarQube, and even once my main branch is analyzed, the main branch is always called "master" in SonarQube.

      Obviously the concept of main branch is not specific to SonarQube, but exists in the ALMs.

      • The main branch depends on the SCM and on the workflow adopted by the company. For example, teams using Gitflow can choose to consider 'develop' as the main branch for their projects.
      • "Master" terminology tends to be replaced by a more neutral word and, from October 1st, GitHub changed their default branch name to ‘main’ instead of ‘master’.

      In both cases, this means that the default branch name in SonarQube could be different from the one on the ALM side.

      Problems:

      WHAT

      As a project administrator:

      • After I imported a project from my ALM and I analyzed the main branch, I expect that both my SonarQube and ALM main branch share the same name.
      • After I upgraded from CE to DE+, I don't expect to have anything special to do to preserve history of my main branch (as documented here).

      We expect this branch name consistency to be available for every ALM for which we support onboarding:

      • Bitbucket Server
      • Github Enterprise Server
      • Github.com
      • Gitlab.com
      • Azure DevOps Server
      • Azure DevOps Services

      Users using the manual project creation won't benefit from this.

      HOW

      During the onboarding from an ALM, we will fetch the default branch from the ALM branches metadata, and rename the "master" branch accordingly if needed.

      Details about ALM API endpoint are detailed in linked tickets.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                christophe.havard Christophe Havard
                Reporter:
                christophe.havard Christophe Havard
              • Votes:
                2 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: