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.
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.