summaryrefslogtreecommitdiff
path: root/lib/gitlab/github_import/importer/labels_importer.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/github_import/importer/labels_importer.rb')
-rw-r--r--lib/gitlab/github_import/importer/labels_importer.rb14
1 files changed, 6 insertions, 8 deletions
diff --git a/lib/gitlab/github_import/importer/labels_importer.rb b/lib/gitlab/github_import/importer/labels_importer.rb
index 80246fa1b77..7293de56a9a 100644
--- a/lib/gitlab/github_import/importer/labels_importer.rb
+++ b/lib/gitlab/github_import/importer/labels_importer.rb
@@ -6,15 +6,9 @@ module Gitlab
class LabelsImporter
include BulkImporting
- attr_reader :project, :client, :existing_labels
-
- # project - An instance of `Project`.
- # client - An instance of `Gitlab::GithubImport::Client`.
# rubocop: disable CodeReuse/ActiveRecord
- def initialize(project, client)
- @project = project
- @client = client
- @existing_labels = project.labels.pluck(:title).to_set
+ def existing_labels
+ @existing_labels ||= project.labels.pluck(:title).to_set
end
# rubocop: enable CodeReuse/ActiveRecord
@@ -51,6 +45,10 @@ module Gitlab
def each_label
client.labels(project.import_source)
end
+
+ def object_type
+ :label
+ end
end
end
end