Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/github_import/importer/attachments/releases_importer.rb')
-rw-r--r--lib/gitlab/github_import/importer/attachments/releases_importer.rb33
1 files changed, 33 insertions, 0 deletions
diff --git a/lib/gitlab/github_import/importer/attachments/releases_importer.rb b/lib/gitlab/github_import/importer/attachments/releases_importer.rb
new file mode 100644
index 00000000000..feaa69eff71
--- /dev/null
+++ b/lib/gitlab/github_import/importer/attachments/releases_importer.rb
@@ -0,0 +1,33 @@
+# frozen_string_literal: true
+
+module Gitlab
+ module GithubImport
+ module Importer
+ module Attachments
+ class ReleasesImporter < ::Gitlab::GithubImport::Importer::Attachments::BaseImporter
+ def sidekiq_worker_class
+ ::Gitlab::GithubImport::Attachments::ImportReleaseWorker
+ end
+
+ def collection_method
+ :release_attachments
+ end
+
+ def object_type
+ :release_attachment
+ end
+
+ def id_for_already_imported_cache(release)
+ release.id
+ end
+
+ private
+
+ def collection
+ project.releases.select(:id, :description)
+ end
+ end
+ end
+ end
+ end
+end