summaryrefslogtreecommitdiff
path: root/lib/gitlab/github_import/label_formatter.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/github_import/label_formatter.rb')
-rw-r--r--lib/gitlab/github_import/label_formatter.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/gitlab/github_import/label_formatter.rb b/lib/gitlab/github_import/label_formatter.rb
index 2cad7fca88e..3101116a614 100644
--- a/lib/gitlab/github_import/label_formatter.rb
+++ b/lib/gitlab/github_import/label_formatter.rb
@@ -14,9 +14,10 @@ module Gitlab
end
def create!
- project.labels.find_or_create_by!(title: title) do |label|
- label.color = color
- end
+ params = attributes.except(:project)
+ service = ::Labels::CreateService.new(project.owner, project, params)
+
+ service.execute
end
private