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

Import a project from GitLab and auto-configure MR decoration

    XMLWordPrintable

    Details

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

      Description

      Create a new endpoint "POST api/alm_integrations/import_gitlab_project", Requires the 'Create Projects' permission

      • input parameters:
        • "almSetting", required, ALM setting key, max length 200
        • "gitlabProjectId", required, GitLab project id, max length 200

       

      This endpoint will create the SonarQube project + configure the MR decoration, selecting the correct ALM and saving the gitlab project id.

       

      repo mapping:
      As we can have several GitLab projects, the GitLab repository name is not unique. We need to generate a key to duplicate them. The mapping will be done with:

      SQ project key = max250characters(replaceSlashWithUnderscore(path_with_namespace + "_" + a generated uuid))
      if the path_with_namespace is longer than 250 characters, we keep the 250 last character. That would keep the most important part of the slug.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Due:
                Created:
                Updated:
                Resolved: