Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-10-19 16:53:31 +0300
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-10-19 19:58:28 +0300
commit4f6d1c1d70d744ff599ae9c51e1cbc3a3c23e13e (patch)
tree0730947487efa9efd134a5263b209a642ccadbe8 /lib/gitlab
parentfc2c64fcdf913a37f987ab5e5626ef9bb9e8b854 (diff)
Rename Labels::CreateService to Labels::FindOrCreateService
Diffstat (limited to 'lib/gitlab')
-rw-r--r--lib/gitlab/fogbugz_import/importer.rb2
-rw-r--r--lib/gitlab/github_import/label_formatter.rb2
-rw-r--r--lib/gitlab/google_code_import/importer.rb2
-rw-r--r--lib/gitlab/issues_labels.rb2
4 files changed, 4 insertions, 4 deletions
diff --git a/lib/gitlab/fogbugz_import/importer.rb b/lib/gitlab/fogbugz_import/importer.rb
index f154ee689cf..ce4d87a0741 100644
--- a/lib/gitlab/fogbugz_import/importer.rb
+++ b/lib/gitlab/fogbugz_import/importer.rb
@@ -75,7 +75,7 @@ module Gitlab
def create_label(name)
params = { title: name, color: nice_label_color(name) }
- ::Labels::CreateService.new(project.owner, project, params).execute
+ ::Labels::FindOrCreateService.new(project.owner, project, params).execute
end
def user_info(person_id)
diff --git a/lib/gitlab/github_import/label_formatter.rb b/lib/gitlab/github_import/label_formatter.rb
index 8ed1574c4fc..942dfb3312b 100644
--- a/lib/gitlab/github_import/label_formatter.rb
+++ b/lib/gitlab/github_import/label_formatter.rb
@@ -15,7 +15,7 @@ module Gitlab
def create!
params = attributes.except(:project)
- service = ::Labels::CreateService.new(project.owner, project, params)
+ service = ::Labels::FindOrCreateService.new(project.owner, project, params)
label = service.execute
raise ActiveRecord::RecordInvalid.new(label) unless label.persisted?
diff --git a/lib/gitlab/google_code_import/importer.rb b/lib/gitlab/google_code_import/importer.rb
index 904a228aeef..b16a5654096 100644
--- a/lib/gitlab/google_code_import/importer.rb
+++ b/lib/gitlab/google_code_import/importer.rb
@@ -234,7 +234,7 @@ module Gitlab
def create_label(name)
params = { name: name, color: nice_label_color(name) }
- ::Labels::CreateService.new(project.owner, project, params).execute
+ ::Labels::FindOrCreateService.new(project.owner, project, params).execute
end
def format_content(raw_content)
diff --git a/lib/gitlab/issues_labels.rb b/lib/gitlab/issues_labels.rb
index 6788eca7146..01a2c19ab23 100644
--- a/lib/gitlab/issues_labels.rb
+++ b/lib/gitlab/issues_labels.rb
@@ -19,7 +19,7 @@ module Gitlab
]
labels.each do |params|
- ::Labels::CreateService.new(project.owner, project).execute(params)
+ ::Labels::FindOrCreateService.new(project.owner, project).execute(params)
end
end
end