GitHub Importer - Migrate pull request assigned reviewers
Release notes
When importing projects from GitHub to GitLab, pull requests are imported as merge requests. However, pull request requested reviewers were not imported. Now requested reviewers are imported as reviewers for merge request. Importing review approval status and reviews requested from teams are out of scope and considered for future iterations.
Problem to solve
When migrating projects from GitHub to GitLab, the pull requests are imported as merge requests. However, any requested reviewers are not imported, thus losing this information during import.
Proposed solution
During project import from GitHub, for each imported merge request, assign any pull request reviewers as approvers for the merge request. After the import, all migrated MRs should maintain their assigned approvers/reviewers.
Note: Importing review approval status is out of the scope of this issue and considered a future iteration.
Note: Any reviews requested from teams will be ignored for now. Importing team reviewers is considered a future iteration.
Technical details
Per GitHub API documentation, the following REST API call can be used to retrieve the list of reviewers:
GET
/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers
Documentation
Following documentation should be updated with the changes implemented in this issue:
-
📖 User doc: https://docs.gitlab.com/ee/user/project/import/github.html -
📖 Developer doc: https://docs.gitlab.com/ee/development/github_importer.html