Draft: GitHub Import using Graphql
What does this MR do and why?
This POC shows how we could use GraphQL to reduce the requests required to migrate a project from GitHub.
The POC replaces the Stage::ImportPullRequestsMergedByWorker
, Stage::ImportPullRequestsReviewRequestsWorker
, Stage::ImportPullRequestsReviewsWorker
and Stage::ImportIssueEventsWorker
stages with the Stage::ImportPullRequestsResourcesWorker
Including comments in the GraphQL query would also be possible, so we could also eliminate the Stage::ImportNotesWorker
. However, I didn't implement it since this is a POC.
One GraphQL call is called per pull request to keep the code simple. However, we could change the query to return multiple pull requests to improve GitHub Import speed since this would return more information per request.
Related to: #433314 (closed)
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.