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 |
---|---|
How to set up and validate locally
Scenario 1
- Have a GitHub repository that belongs to a GitHub organization
- Add 2 users to the repository collaborators:
- one who is an organization member
- one who is not an organization member
- Import the GitHub project to GitLab via
-
UI: On GitLab go to the
Import repositories from GitHub
page (/import/github/status). Make sure theImport collaborators
checkbox in theAdvanced import settings
is selected by default -
API: Use POST request to our API with specifying the
"collaborators_import": true
optional_stage
- Go to the imported project -> Project information -> Members
- 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
- The same as in the previous scenario
- The same as in the previous scenario
- Import the GitHub project to GitLab via
-
UI: On GitLab go to the
Import repositories from GitHub
page (/import/github/status). Uncheck theImport collaborators
checkbox in theAdvanced import settings
-
API: Use POST request to our API with specifying the
"collaborators_import": false
optional_stage
- The same as in the previous scenario
- 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
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Tetiana Zavediuk