summaryrefslogtreecommitdiff
path: root/lib/gitlab/github_import/importer/issue_and_label_links_importer.rb
blob: bad064b76c889d4ffe5443fc8d50f57080e0ad6c (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
# frozen_string_literal: true

module Gitlab
  module GithubImport
    module Importer
      class IssueAndLabelLinksImporter
        attr_reader :issue, :project, :client

        # issue - An instance of `Gitlab::GithubImport::Representation::Issue`.
        # project - An instance of `Project`
        # client - An instance of `Gitlab::GithubImport::Client`
        def initialize(issue, project, client)
          @issue = issue
          @project = project
          @client = client
        end

        def execute
          IssueImporter.import_if_issue(issue, project, client)
          LabelLinksImporter.new(issue, project, client).execute
        end
      end
    end
  end
end