Module: Gitlab::GithubImport
- Defined in:
- lib/gitlab/github_import.rb,
lib/gitlab/github_import/client.rb,
lib/gitlab/github_import/user_finder.rb,
lib/gitlab/github_import/label_finder.rb,
lib/gitlab/github_import/page_counter.rb,
lib/gitlab/github_import/markdown_text.rb,
lib/gitlab/github_import/bulk_importing.rb,
lib/gitlab/github_import/representation.rb,
lib/gitlab/github_import/issuable_finder.rb,
lib/gitlab/github_import/milestone_finder.rb,
lib/gitlab/github_import/rate_limit_error.rb,
lib/gitlab/github_import/parallel_importer.rb,
lib/gitlab/github_import/parallel_scheduling.rb,
lib/gitlab/github_import/representation/note.rb,
lib/gitlab/github_import/representation/user.rb,
lib/gitlab/github_import/sequential_importer.rb,
lib/gitlab/github_import/representation/issue.rb,
app/workers/concerns/gitlab/github_import/queue.rb,
lib/gitlab/github_import/importer/note_importer.rb,
lib/gitlab/github_import/representation/to_hash.rb,
lib/gitlab/github_import/importer/issue_importer.rb,
lib/gitlab/github_import/importer/notes_importer.rb,
lib/gitlab/github_import/importer/issues_importer.rb,
lib/gitlab/github_import/importer/labels_importer.rb,
lib/gitlab/github_import/representation/diff_note.rb,
lib/gitlab/github_import/representation/lfs_object.rb,
app/workers/gitlab/github_import/import_note_worker.rb,
lib/gitlab/github_import/importer/releases_importer.rb,
app/workers/gitlab/github_import/import_issue_worker.rb,
lib/gitlab/github_import/importer/diff_note_importer.rb,
lib/gitlab/github_import/representation/pull_request.rb,
app/workers/gitlab/github_import/advance_stage_worker.rb,
lib/gitlab/github_import/importer/diff_notes_importer.rb,
lib/gitlab/github_import/importer/lfs_object_importer.rb,
lib/gitlab/github_import/importer/milestones_importer.rb,
lib/gitlab/github_import/importer/repository_importer.rb,
lib/gitlab/github_import/importer/label_links_importer.rb,
lib/gitlab/github_import/importer/lfs_objects_importer.rb,
app/workers/concerns/gitlab/github_import/stage_methods.rb,
lib/gitlab/github_import/importer/pull_request_importer.rb,
app/workers/gitlab/github_import/import_diff_note_worker.rb,
lib/gitlab/github_import/importer/pull_requests_importer.rb,
lib/gitlab/github_import/representation/expose_attribute.rb,
app/workers/concerns/gitlab/github_import/object_importer.rb,
app/workers/gitlab/github_import/import_lfs_object_worker.rb,
app/workers/gitlab/github_import/refresh_import_jid_worker.rb,
app/workers/gitlab/github_import/stage/import_notes_worker.rb,
app/workers/gitlab/github_import/import_pull_request_worker.rb,
app/workers/gitlab/github_import/stage/finish_import_worker.rb,
app/workers/concerns/gitlab/github_import/rescheduling_methods.rb,
app/workers/gitlab/github_import/stage/import_base_data_worker.rb,
app/workers/gitlab/github_import/stage/import_repository_worker.rb,
app/workers/gitlab/github_import/stage/import_lfs_objects_worker.rb,
lib/gitlab/github_import/importer/issue_and_label_links_importer.rb,
app/workers/gitlab/github_import/stage/import_pull_requests_worker.rb,
app/workers/gitlab/github_import/stage/import_issues_and_diff_notes_worker.rb
Defined Under Namespace
Modules: BulkImporting, Importer, ObjectImporter, ParallelScheduling, Queue, Representation, ReschedulingMethods, Stage, StageMethods Classes: AdvanceStageWorker, Client, ImportDiffNoteWorker, ImportIssueWorker, ImportLfsObjectWorker, ImportNoteWorker, ImportPullRequestWorker, IssuableFinder, LabelFinder, MarkdownText, MilestoneFinder, PageCounter, ParallelImporter, RefreshImportJidWorker, SequentialImporter, UserFinder
Constant Summary collapse
- RateLimitError =
Error that will be raised when we're about to reach (or have reached) the GitHub API's rate limit.
Class.new(StandardError)
Class Method Summary collapse
-
.ghost_user_id ⇒ Object
Returns the ID of the ghost user.
- .new_client_for(project, token: nil, parallel: true) ⇒ Object
- .refmap ⇒ Object
Class Method Details
.ghost_user_id ⇒ Object
Returns the ID of the ghost user.
16 17 18 19 20 |
# File 'lib/gitlab/github_import.rb', line 16 def self.ghost_user_id key = 'github-import/ghost-user-id' Gitlab::Cache::Import::Caching.read_integer(key) || Gitlab::Cache::Import::Caching.write(key, User.select(:id).ghost.id) end |
.new_client_for(project, token: nil, parallel: true) ⇒ Object
9 10 11 12 13 |
# File 'lib/gitlab/github_import.rb', line 9 def self.new_client_for(project, token: nil, parallel: true) token_to_use = token || project.import_data&.credentials&.fetch(:user) Client.new(token_to_use, parallel: parallel) end |
.refmap ⇒ Object
5 6 7 |
# File 'lib/gitlab/github_import.rb', line 5 def self.refmap [:heads, :tags, '+refs/pull/*/head:refs/merge-requests/*/head'] end |