From ee664acb356f8123f4f6b00b73c1e1cf0866c7fb Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Thu, 20 Oct 2022 09:40:42 +0000 Subject: Add latest changes from gitlab-org/gitlab@15-5-stable-ee --- .../attachments/import_issue_worker.rb | 23 ++++++++++++++++++++++ .../attachments/import_merge_request_worker.rb | 23 ++++++++++++++++++++++ .../attachments/import_note_worker.rb | 23 ++++++++++++++++++++++ .../attachments/import_release_worker.rb | 23 ++++++++++++++++++++++ 4 files changed, 92 insertions(+) create mode 100644 app/workers/gitlab/github_import/attachments/import_issue_worker.rb create mode 100644 app/workers/gitlab/github_import/attachments/import_merge_request_worker.rb create mode 100644 app/workers/gitlab/github_import/attachments/import_note_worker.rb create mode 100644 app/workers/gitlab/github_import/attachments/import_release_worker.rb (limited to 'app/workers/gitlab/github_import/attachments') diff --git a/app/workers/gitlab/github_import/attachments/import_issue_worker.rb b/app/workers/gitlab/github_import/attachments/import_issue_worker.rb new file mode 100644 index 00000000000..1a9fa15b850 --- /dev/null +++ b/app/workers/gitlab/github_import/attachments/import_issue_worker.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +module Gitlab + module GithubImport + module Attachments + class ImportIssueWorker # rubocop:disable Scalability/IdempotentWorker + include ObjectImporter + + def representation_class + Representation::NoteText + end + + def importer_class + Importer::NoteAttachmentsImporter + end + + def object_type + :issue_attachment + end + end + end + end +end diff --git a/app/workers/gitlab/github_import/attachments/import_merge_request_worker.rb b/app/workers/gitlab/github_import/attachments/import_merge_request_worker.rb new file mode 100644 index 00000000000..a86852b094f --- /dev/null +++ b/app/workers/gitlab/github_import/attachments/import_merge_request_worker.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +module Gitlab + module GithubImport + module Attachments + class ImportMergeRequestWorker # rubocop:disable Scalability/IdempotentWorker + include ObjectImporter + + def representation_class + Representation::NoteText + end + + def importer_class + Importer::NoteAttachmentsImporter + end + + def object_type + :merge_request_attachment + end + end + end + end +end diff --git a/app/workers/gitlab/github_import/attachments/import_note_worker.rb b/app/workers/gitlab/github_import/attachments/import_note_worker.rb new file mode 100644 index 00000000000..2f5bc50ee0b --- /dev/null +++ b/app/workers/gitlab/github_import/attachments/import_note_worker.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +module Gitlab + module GithubImport + module Attachments + class ImportNoteWorker # rubocop:disable Scalability/IdempotentWorker + include ObjectImporter + + def representation_class + Representation::NoteText + end + + def importer_class + Importer::NoteAttachmentsImporter + end + + def object_type + :note_attachment + end + end + end + end +end diff --git a/app/workers/gitlab/github_import/attachments/import_release_worker.rb b/app/workers/gitlab/github_import/attachments/import_release_worker.rb new file mode 100644 index 00000000000..5eea5702d3c --- /dev/null +++ b/app/workers/gitlab/github_import/attachments/import_release_worker.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +module Gitlab + module GithubImport + module Attachments + class ImportReleaseWorker # rubocop:disable Scalability/IdempotentWorker + include ObjectImporter + + def representation_class + Representation::NoteText + end + + def importer_class + Importer::NoteAttachmentsImporter + end + + def object_type + :release_attachment + end + end + end + end +end -- cgit v1.2.1