blob: 466288fde4c88c6518f2a839580aab160f2483b4 (
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
38
|
# frozen_string_literal: true
module Gitlab
module GithubImport
module Importer
class PullRequestsMergedByImporter
include ParallelScheduling
def importer_class
PullRequestMergedByImporter
end
def representation_class
Gitlab::GithubImport::Representation::PullRequest
end
def sidekiq_worker_class
ImportPullRequestMergedByWorker
end
def collection_method
:pull_requests_merged_by
end
def id_for_already_imported_cache(pr)
pr.number
end
def each_object_to_import
project.merge_requests.with_state(:merged).find_each do |merge_request|
pull_request = client.pull_request(project.import_source, merge_request.iid)
yield(pull_request)
end
end
end
end
end
end
|