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

issues_importer.rb « attachments « importer « github_import « gitlab « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: c8f0b59fd18ce038e51d1b645cff3e5fae1e5ee8 (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
36
37
# frozen_string_literal: true

module Gitlab
  module GithubImport
    module Importer
      module Attachments
        class IssuesImporter < ::Gitlab::GithubImport::Importer::Attachments::BaseImporter
          def sidekiq_worker_class
            ::Gitlab::GithubImport::Attachments::ImportIssueWorker
          end

          def collection_method
            :issue_attachments
          end

          def object_type
            :issue_attachment
          end

          def id_for_already_imported_cache(issue)
            issue.id
          end

          private

          def collection
            project.issues.select(:id, :description, :iid)
          end

          def ordering_column
            :iid
          end
        end
      end
    end
  end
end