summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-10-19 17:27:58 -0200
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-10-19 17:27:58 -0200
commit97762a5858864dd39aa744e19bc16b555832ebba (patch)
treea57912dea3f6414e27343733aab2dfcdc2cf08a4 /lib
parent1d8b74fee34af0f13e69a3363417493746279488 (diff)
downloadgitlab-ce-97762a5858864dd39aa744e19bc16b555832ebba.tar.gz
Use LabelsFinder on Google Code importer
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/google_code_import/importer.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/gitlab/google_code_import/importer.rb b/lib/gitlab/google_code_import/importer.rb
index b16a5654096..6a68e786b4f 100644
--- a/lib/gitlab/google_code_import/importer.rb
+++ b/lib/gitlab/google_code_import/importer.rb
@@ -101,7 +101,8 @@ module Gitlab
state: raw_issue['state'] == 'closed' ? 'closed' : 'opened'
)
- issue.update_attribute(:label_ids, project.labels.where(title: labels).pluck(:id))
+ issue_labels = ::LabelsFinder.new(project.owner, project_id: project.id, title: labels).execute
+ issue.update_attribute(:label_ids, issue_labels.pluck(:id))
import_issue_comments(issue, comments)
end