diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-19 12:08:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-19 12:08:42 +0300 |
commit | b76ae638462ab0f673e5915986070518dd3f9ad3 (patch) | |
tree | bdab0533383b52873be0ec0eb4d3c66598ff8b91 /lib/gitlab/github_import/importer/labels_importer.rb | |
parent | 434373eabe7b4be9593d18a585fb763f1e5f1a6f (diff) |
Add latest changes from gitlab-org/gitlab@14-2-stable-eev14.2.0-rc42
Diffstat (limited to 'lib/gitlab/github_import/importer/labels_importer.rb')
-rw-r--r-- | lib/gitlab/github_import/importer/labels_importer.rb | 14 |
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 |