Gitea project import incorrectly attempts to map imported items to GitHub user accounts
Summary
Gitea import attempts to map the Gitea user.id
to an external GitHub id.
This causes considerable confusion when a match is found to the wrong GitLab user.
Steps to reproduce
- Create a PR in a Gitea project and note the
user.id
user.id
as seen in Gitea API result (https://gitea.com/api/v1/repos/habile/my_second_gitea_repo/pulls/2)
{
"id": 61554,
"url": "https://gitea.com/habile/my_second_gitea_repo/pulls/2",
"number": 2,
"user": {
"id": 38841,
"login": "habile",
- Add the Gitea
user_id
to an unrelated GitLab user as a GitHubextern_uid
(to emulate SSO linkage with GitHub)
id | extern_uid | provider | user_id | created_at | updated_at | secondary_extern_uid | saml_provider_id |
---|---|---|---|---|---|---|---|
999 | 38841 | github | 39 | 2023-05-09 20:48:47 | 2023-05-09 20:48:47 |
- Import the Gitea project to GitLab
- Observe that the imported PR is assigned to the incorrect GitLab user
What is the expected correct behavior?
Import should not be attempting to match Gitea user IDs with GitHub!
The PR should be attributed with the correct GitLab user (if they exist by email etc.), or created by set to the user importing the project and Created_by: <username>
added to the PR/MR description:
Customer reported: ZD Ticket - internal
Edited by Chris Stone