Skip to content

Gitea Importer - Map contributions to personal namespace owner

What does this MR do and why?

This MR updates the Gitea importer so that when a project is imported into a personal user namespace, all user contributions are assigned to the personal namespace owner. Because personal namespaces don't have memberships like groups, there's no way for a user to reassign placeholder users via the UI. Plus, user contribution mapping isn't supported in personal namespaces, so it's simpler to immediately map contributions to the namespace owner. Only personal namespace owners and admins can import projects into a personal namespace (see user_namespace_policy)

References

Screenshots or screen recordings

Destination type Before After
Personal namespace image user_mapping_to_personal_namespace_owner enabled:
image
user_mapping_to_personal_namespace_owner disabled:
image
Group image user_mapping_to_personal_namespace_owner enabled (no effect):
image

How to set up and validate locally

  1. Enable user_mapping_to_personal_namespace_owner
  2. Ensure you have access to a Gitea repository with user contributions. See import from Gitea docs for instructions and prerequisites
  3. Import a repository from Gitea into a personal namespace
  4. Verify that all user contributions have been mapped to the namespace owner
  5. Import the project to group
  6. Verify that placeholder users were created and user mapping is unaffected

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.

Related to #525342 (closed)

Edited by Sam Word

Merge request reports

Loading