diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-08-30 18:10:02 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-08-30 18:10:02 +0300 |
commit | 4b1fc3dc32e768499d81ed64ea7ed497c1785c48 (patch) | |
tree | f589b638e5f54301f46e3f2882a660e8f23817b3 /doc/development/github_importer.md | |
parent | 60273ebb302dabd6e724e4b7baf9ed7b39de5c09 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/development/github_importer.md')
-rw-r--r-- | doc/development/github_importer.md | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/doc/development/github_importer.md b/doc/development/github_importer.md index e3bf605638d..047625f3f0e 100644 --- a/doc/development/github_importer.md +++ b/doc/development/github_importer.md @@ -101,7 +101,20 @@ label links in the same worker removes the need for performing a separate crawl through the API data, reducing the number of API calls necessary to import a project. -### 8. Stage::ImportNotesWorker +### 8. Stage::ImportIssueEventsWorker + +This worker imports all issues and pull request events. For every event, we +schedule a job for the `Gitlab::GithubImport::ImportIssueEventWorker` worker. + +We can import both issues and pull request events by single stage because of a specific aspect of the GitHub API. It looks like that under the hood, issues and pull requests +GitHub are stored in a single table. Therefore, they have globally-unique IDs and so: + +- Every pull request is an issue. +- Issues aren't pull requests. + +Therefore, both issues and pull requests have a common API for most related things. + +### 9. Stage::ImportNotesWorker This worker imports regular comments for both issues and pull requests. For every comment, we schedule a job for the @@ -112,7 +125,7 @@ returns comments for both issues and pull requests. This means we have to wait for all issues and pull requests to be imported before we can import regular comments. -### 9. Stage::FinishImportWorker +### 10. Stage::FinishImportWorker This worker completes the import process by performing some housekeeping (such as flushing any caches) and by marking the import as completed. |