Commit ce381140 authored by Mike Russo's avatar Mike Russo Committed by Amy Qualls

GitHub Import documentation Vale fixes

parent 702cb193
......@@ -31,13 +31,18 @@ each imported repository maintains visibility level unless that [visibility
level is restricted](../../../public_access/public_access.md#restrict-use-of-public-or-internal-projects),
in which case it defaults to the default project visibility.
The namespace is a user or group in GitLab, such as `gitlab.com/janedoe` or `gitlab.com/customer-success`. You can do some bulk actions to move projects to different namespaces in the rails console.
The namespace is a user or group in GitLab, such as `gitlab.com/janedoe` or
`gitlab.com/customer-success`. You can do some bulk actions to move projects to
different namespaces in the rails console.
This process does not migrate or import any types of groups or organizations from GitHub to GitLab.
This process does not migrate or import any types of groups or organizations
from GitHub to GitLab.
## Use cases
The steps you take depend on whether you are importing from GitHub.com or GitHub Enterprise, as well as whether you are importing to GitLab.com or self-managed GitLab instance.
The steps you take depend on whether you are importing from GitHub.com or
GitHub Enterprise. The steps also depend on whether you are importing to GitLab.com or
self-managed GitLab instance.
- If you're importing to GitLab.com, you can alternatively import GitHub repositories
using a [personal access token](#use-a-github-token). We do not recommend
......@@ -49,12 +54,14 @@ The steps you take depend on whether you are importing from GitHub.com or GitHub
- If you're importing from GitHub Enterprise to your self-managed GitLab instance, you must first enable
[GitHub integration](../../../integration/github.md).
- To import projects from GitHub Enterprise to GitLab.com, use the [Import API](../../../api/import.md).
- If you're importing from GitHub.com to your self-managed GitLab instance, you do not need to set up GitHub integration. You can use the [Import API](../../../api/import.md).
- If you're importing from GitHub.com to your self-managed GitLab instance,
setting up GitHub integration is not required. You can use the [Import API](../../../api/import.md).
## How it works
When issues and pull requests are being imported, the importer attempts to find their GitHub authors and
assignees in the database of the GitLab instance (note that pull requests are called "merge requests" in GitLab).
When issues and pull requests are being imported, the importer attempts to find
their GitHub authors and assignees in the database of the GitLab instance (note
that pull requests are called "merge requests" in GitLab).
For this association to succeed, each GitHub author and assignee in the repository
must meet one of the following conditions prior to the import:
......@@ -64,12 +71,13 @@ must meet one of the following conditions prior to the import:
that matches their GitLab account's email address.
NOTE:
GitLab content imports that use GitHub accounts require that the GitHub public-facing
email address is populated so that all comments and contributions are properly mapped
to the same user in GitLab. GitHub Enterprise (on premise) does not require this field
to be populated to use the product, so you may need to add it on existing GitHub Enterprise
accounts for imported content to be properly mapped to the user in the new system.
Refer to GitHub documentation for instructions on how to add that address.
GitLab content imports that use GitHub accounts require that the GitHub
public-facing email address is populated so that all comments and
contributions are properly mapped to the same user in GitLab. GitHub
Enterprise (on premise) does not require this field to be populated to use the
product, so you may have to add it on existing accounts for the imported
content to be properly mapped to the user in the new system. Refer to GitHub
documentation for instructions on how to add this email address.
If a user referenced in the project is not found in the GitLab database, the project creator (typically the user
that initiated the import process) is set as the author/assignee, but a note on the issue mentioning the original
......@@ -132,7 +140,7 @@ If you are not using the GitHub integration, you can still perform an authorizat
1. Copy the token hash.
1. Go back to GitLab and provide the token to the GitHub importer.
1. Hit the **List Your GitHub Repositories** button and wait while GitLab reads your repositories' information.
Once done, you'll be taken to the importer page to select the repositories to import.
Once done, you are taken to the importer page to select the repositories to import.
To use a newer personal access token in imports after previously performing these steps, sign out of
your GitLab account and sign in again, or revoke the older personal access token in GitHub.
......@@ -152,7 +160,7 @@ your GitHub repositories are listed.
![GitHub importer page](img/import_projects_from_github_importer_v12_3.png)
## Mirroring and pipeline status sharing
## Mirror a repository and share pipeline status
Depending on your GitLab tier, [repository mirroring](../repository/repository_mirroring.md) can be set up to keep
your imported repository in sync with its GitHub copy.
......@@ -169,7 +177,7 @@ Mirroring does not sync any new or updated pull requests from your GitHub projec
## Improve the speed of imports on self-managed instances
NOTE:
Administrator access to the GitLab server is required.
An administrator role on the GitLab server is required for this process.
For large projects it may take a while to import all data. To reduce the time necessary, you can increase the number of
Sidekiq workers that process the following queues:
......@@ -183,19 +191,19 @@ servers. For 4 servers with 8 cores this means you can import up to 32 objects (
Reducing the time spent in cloning a repository can be done by increasing network throughput, CPU capacity, and disk
performance (by using high performance SSDs, for example) of the disks that store the Git repositories (for your GitLab instance).
Increasing the number of Sidekiq workers will *not* reduce the time spent cloning repositories.
Increasing the number of Sidekiq workers does *not* reduce the time spent cloning repositories.
## Alternative way to import notes and diff notes
When GitHub Importer runs on extremely large projects not all notes & diff notes can be imported due to GitHub API `issues_comments` & `pull_requests_comments` endpoints limitation.
Not all pages can be fetched due to the following error coming from GitHub API: `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.`.
Because of that, alternative approach for importing notes & diff notes is available that is behind a feature flag.
An alternative approach for importing notes and diff notes is available behind a feature flag.
Instead of using `issues_comments` & `pull_requests_comments`, use individual resources `issue_comments` & `pull_request_comments` instead in order to pull notes from 1 object at a time.
This allows us to carry over any missing comments, however it increases the number of network requests required to perform the import, which means its execution is going to be much longer.
Instead of using `issues_comments` and `pull_requests_comments`, use individual resources `issue_comments` and `pull_request_comments` instead to pull notes from one object at a time.
This allows us to carry over any missing comments, however it increases the number of network requests required to perform the import, which means its execution takes a longer time.
In order to use alternative way of importing notes `github_importer_single_endpoint_notes_import` feature flag needs to be enabled on the group project is being imported into.
To use the alternative way of importing notes, the `github_importer_single_endpoint_notes_import` feature flag must be enabled on the group project is being imported into.
Start a [Rails console](../../../administration/operations/rails_console.md#starting-a-rails-console-session).
......
......@@ -11,7 +11,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
GitLab provides an integration for updating the pipeline statuses on GitHub.
This is especially useful if using GitLab for CI/CD only.
This project integration is separate from the [instance wide GitHub integration](../import/github.md#mirroring-and-pipeline-status-sharing)
This project integration is separate from the [instance wide GitHub integration](../import/github.md#mirror-a-repository-and-share-pipeline-status)
and is automatically configured on [GitHub import](../../../integration/github.md).
![Pipeline status update on GitHub](img/github_status_check_pipeline_update.png)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment