summaryrefslogtreecommitdiff
path: root/lib/gitlab/google_code_import/importer.rb
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-10-18 00:27:10 -0200
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-10-19 14:58:27 -0200
commitd009d38ed6ab5459f596194ce808c304e6379161 (patch)
tree4e48d7971255807c008d7c5ff1ade48a92b192af /lib/gitlab/google_code_import/importer.rb
parent6c189dcc8e76d5ddb348832500b003bf0d1b49a6 (diff)
downloadgitlab-ce-d009d38ed6ab5459f596194ce808c304e6379161.tar.gz
User Labes::CreateService to create labels
Diffstat (limited to 'lib/gitlab/google_code_import/importer.rb')
-rw-r--r--lib/gitlab/google_code_import/importer.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/google_code_import/importer.rb b/lib/gitlab/google_code_import/importer.rb
index 79a0eaba1e8..904a228aeef 100644
--- a/lib/gitlab/google_code_import/importer.rb
+++ b/lib/gitlab/google_code_import/importer.rb
@@ -233,8 +233,8 @@ module Gitlab
end
def create_label(name)
- color = nice_label_color(name)
- project.labels.create!(name: name, color: color)
+ params = { name: name, color: nice_label_color(name) }
+ ::Labels::CreateService.new(project.owner, project, params).execute
end
def format_content(raw_content)