blob: 5ab0cf5b6b07c04eca5a7b050ace06d032af99d1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
# frozen_string_literal: true
module Gitlab
module GithubImport
module Importer
module Attachments
class NotesImporter < ::Gitlab::GithubImport::Importer::Attachments::BaseImporter
def sidekiq_worker_class
::Gitlab::GithubImport::Attachments::ImportNoteWorker
end
def collection_method
:note_attachments
end
def object_type
:note_attachment
end
def id_for_already_imported_cache(note)
note.id
end
private
# TODO: exclude :system, :noteable_type from select after removing override Note#note method
# https://gitlab.com/gitlab-org/gitlab/-/issues/369923
def collection
project.notes.id_not_in(already_imported_ids).user.select(:id, :note, :system, :noteable_type)
end
end
end
end
end
end
|