node-gitlab-2-github icon indicating copy to clipboard operation
node-gitlab-2-github copied to clipboard

User mapping for Merge Requests

Open mike-potter opened this issue 3 years ago • 8 comments

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?

mike-potter avatar Oct 07 '21 19:10 mike-potter

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)

mdbenito avatar Dec 03 '21 18:12 mdbenito

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

spruce avatar Jan 10 '22 22:01 spruce

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)

mdbenito avatar Jan 11 '22 08:01 mdbenito

Have you guys checked this?

XabierGoros avatar Apr 29 '23 10:04 XabierGoros

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

mdbenito avatar Apr 29 '23 12:04 mdbenito

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

XabierGoros avatar May 22 '23 09:05 XabierGoros

@XabierGoros totally forgot about that repo 😅

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

valentinschabschneider avatar Jul 05 '23 18:07 valentinschabschneider

@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 🙂

pelme avatar Jul 06 '23 08:07 pelme