diff --git a/doc/user/project/import/github.md b/doc/user/project/import/github.md index 75d25e29bd9e68eec286a4bade16b96b7c4323be..5b9c5ea2535e540bf8934fefd8377e361996d669 100644 --- a/doc/user/project/import/github.md +++ b/doc/user/project/import/github.md @@ -161,14 +161,15 @@ When the **Organization** tab is selected, you can further narrow down your sear To make imports as fast as possible, the following items aren't imported from GitHub by default: - Issue and pull request events. For example, _opened_ or _closed_, _renamed_, and _labeled_ or _unlabeled_. -- All comments. In regular import of large repositories some comments might get skipped due to limitation of GitHub API. +- More than approximately 30,000 comments because of a [limitation of the GitHub API](#missing-comments). - Markdown attachments from repository comments, release posts, issue descriptions, and pull request descriptions. These can include images, text, or binary attachments. If not imported, links in Markdown to attachments break after you remove the attachments from GitHub. You can choose to import these items, but this could significantly increase import time. To import these items, select the appropriate fields in the UI: - **Import issue and pull request events**. -- **Use alternative comments import method**. +- **Use alternative comments import method**. If importing GitHub projects with more than approximately 30,000 comments, you should enable this method because of a + [limitation of the GitHub API](#missing-comments). - **Import Markdown attachments**. - **Import collaborators** (selected by default). Leaving it selected might result in new users using a seat in the group or namespace, and being granted permissions [as high as project owner](#collaborators-members). Only direct collaborators are imported. @@ -475,19 +476,20 @@ repository to be imported manually. Administrators can manually import the repos The GitHub importer might encounter some errors when importing large projects. -#### Alternative way to import notes and diff notes +#### Missing comments -When the GitHub importer runs on extremely large projects, not all notes and diff notes can be imported due to the GitHub API `issues_comments` and `pull_requests_comments` endpoint limitations. - -If it's not possible to fetch all pages, the GitHub API might return the following error: +The GitHub API has a limit that prevents more than approximately 30,000 notes or diff notes from being imported. +When this limit is reached, the GitHub API instead returns the following error: ```plaintext In order to keep the API fast for everyone, pagination is limited for this resource. Check the rel=last link relation in the Link response header to see how far back you can traverse. ``` -An [alternative approach](#select-additional-items-to-import) for importing comments is available. +For example, see [this GitHub API response](https://api.github.com/repositories/27193779/issues/comments?page=401&per_page=100). -Instead of using `issues_comments` and `pull_requests_comments`, use individual resources to pull notes from one object at a time. This way, you can carry over any missing comments. However, execution takes longer because this method increases the number of network requests required to perform the import. +If you are importing GitHub projects with a large number of comments, you should select the **Use alternative comments import method** +[additional item to import](#select-additional-items-to-import) checkbox. This setting makes the import process take longer because it increases the number of network requests +required to perform the import. #### Reduce GitHub API request objects per page