Assign all imported contributions to personal namespace owner
What does this MR do and why?
When importing to a personal namespace, all contributions were assigned to the Import User. Now all contributions are assigned to the owner of the personal namespace.
- Cleanup user_mapping_to_personal_namespace_owner related code
- Remove all code related to user_mapping_to_personal_namespace_owner FF
- Update documentation.
References
Screenshots or screen recordings
| Before | After |
|---|---|
How to set up and validate locally
This change impacts the importers for GitHub, Gitea, and Bitbucket Server. We need to test these importers, and the following aspects should be verified:
When importing projects into personal namespace
- UI warning should display the following message
When you import to a personal namespace, all contributions are assigned to the personal namespace owner and they cannot be reassigned. To map contributions to real users, import to a group instead. Learn more.
- All imported contributions should be assigned to the personal namespace owner
- No placeholder references or import source user should be created.
When importing projects into a group
- No UI warning should be displayed
- All imported contributions should be assigned to placeholder users
- Placeholder references and the import source user should be created.
GitHub Importer
- Create a project on GitHub.com with some contributions (MR, issues, comments)
- In GitLab:
- If not already enabled, turn on the GitHub Importer in the admin settings under Admin -> Settings -> General -> Import and export settings -> Import sources -> GitHub.
- Visit
/projects/new#import_project - Choose GitHub.
- Provide a GitHub access token
- Select a project to be imported
- Import the project into a personal namespace and then into a group
- Verify if the importer works as expected
Gitea Importer
- Create a project on Gitea.com with some contributions (MR, issues, comments)
- In GitLab:
- If not already enabled, turn on the Gitea Importer in the admin settings under Admin -> Settings -> General -> Import and export settings -> Import sources -> Gitea.
- Visit
/projects/new#import_project - Choose Gitea.
- Gitea host URL (https://gitea.com)
- Provide a Gitea access token
- Select a project to be imported
- Import the project into a personal namespace and then into a group
- Verify if the importer works as expected
Bitbucket Server Importer
- Follow the Import and Integration guide to set up a local Bitbucket Server instance.
- In the Bitbucket Server instance, create a repo and a PR with comments.
- In GitLab:
- If not already enabled, turn on the Bitbucket Server Importer in the admin settings under Admin -> Settings -> General -> Import and export settings -> Import sources -> Bitbucket Server.
- Visit
/admin/application_settings/networkand enable local requests. - Visit
/projects/new#import_project. - Choose Bitbucket Server.
- Enter your server details, and click List your Bitbucket Server repositories.
- Import the project into a personal namespace and then into a group
- Verify if the importer works as expected
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.