Skip to content

Move collaborators import to Advanced import setting

What does this MR do and why?

It makes the collaborators import stage optional. In the UI it adds the additional checkbox to the Advanced import settings list checked by default. In this case, we will import collaborators by default, but the warning that new users will use a seat in the namespace will still be displayed.

It also changes the collaborators import stage to import only direct repository collaborators who are not outside collaborators.

It implements #398154 (closed).

Screenshots or screen recordings

Import via UI Import via API
collaborators-import-checkbox import-via-api-with-collaborators-import-enabled

How to set up and validate locally

Scenario 1

  1. Have a GitHub repository that belongs to a GitHub organization
  2. Add 2 users to the repository collaborators:
  • one who is an organization member
  • one who is not an organization member
  1. Import the GitHub project to GitLab via
  • UI: On GitLab go to the Import repositories from GitHub page (/import/github/status). Make sure the Import collaborators checkbox in the Advanced import settings is selected by default
  • API: Use POST request to our API with specifying the "collaborators_import": true optional_stage
  1. Go to the imported project -> Project information -> Members
  2. Make sure in the list of project members you
  • see the user who is the GitHub organization member
  • don't see the user who is not the GitHub organization member

Scenario 2

  1. The same as in the previous scenario
  2. The same as in the previous scenario
  3. Import the GitHub project to GitLab via
  • UI: On GitLab go to the Import repositories from GitHub page (/import/github/status). Uncheck the Import collaborators checkbox in the Advanced import settings
  • API: Use POST request to our API with specifying the "collaborators_import": false optional_stage
  1. The same as in the previous scenario
  2. Make sure no collaborators have been imported and in the list of project members you
  • don't see the user who is the GitHub organization member
  • don't see the user who is not the GitHub organization member

MR acceptance checklist

Edited by Tetiana Zavediuk

Merge request reports