Uploaded image for project: 'SonarQube'
  1. SonarQube
  2. SONAR-14558

Fetch and update main branch name during Gitlab project onboarding

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 8.8
    • Component/s: Branch & PR
    • Labels:
      None
    • Edition:
      Community
    • Production Notes:
      None

      Description

      How V2: retrieve the main branch information from an API call to the ALM, during the onboarding. Right after the SonarQube project creation, try to retrieve the "main branch" from the ALM, and if found, change the default branch on the Sonarqube project.

       curl "https://gitlab.com/api/v4/projects/{projectId}/repository/branches" | jq .
      

      +  filter on field "default": true
       

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              pierre.guillot Pierre Guillot
              Reporter:
              pierre.guillot Pierre Guillot
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Due:
                Created:
                Updated:
                Resolved: