piceaTech / node-gitlab-2-github

Migrate Issues, milestones etc from gitlab to github
MIT License
555 stars 136 forks source link

User mapping for Merge Requests #104

Open mike-potter opened 3 years ago

mike-potter commented 3 years ago

I have filled out the user mapping table between GitLab and GitHub usernames. However, when I migrate the MRs->PRs the owner of the PR in Github is always my own user and not the user from GitLab. Is there a way to fix that?

mdbenito commented 2 years ago

Not really. The GH api sets the owner to the one making the request. The only way is to make requests as the different users (with different tokens) or to use an impersonation token, as available on GH Enterprise. This script does not allow for that (yet)

spruce commented 2 years ago

@mike-potter with the new setting useIssueImportAPI it may be possible. @mdbenito did you test that?

mdbenito commented 2 years ago

Sadly, the issue import API does not allow setting the creator of an issue. The only solutions I know of are the two I listed (and I'm not sure about how the impersonation token would work)

XabierGoros commented 1 year ago

Have you guys checked this?

mdbenito commented 1 year ago

That would be a very useful contribution! Can we expect a PR? 😃

XabierGoros commented 1 year ago

Not my changes, all credits are for @valentinschabschneider from his repo. He should definitely be contacted. I personally tested those changes with great success.

valentinschabschneider commented 1 year ago

@XabierGoros totally forgot about that repo 😅

Cool to see that @pelme is now implementing it properly 🎉

pelme commented 1 year ago

@valentinschabschneider I assume you already migrated your repos but a quick code review from you would be very helpful.🙏

There were a handful of merge conflicts to deal with, I hope I didn’t screw anything up 🙂