summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMayra Cabrera <mcabrera@gitlab.com>2019-05-08 12:39:55 +0000
committerMayra Cabrera <mcabrera@gitlab.com>2019-05-08 12:39:55 +0000
commit3f6f40b34705cc4d24a3d618117dff106e4d0ca0 (patch)
treebfda79905153170154cc9530a16f2a4cc3387d36 /lib
parenta2128edfee799e49a8732bfa235e2c5e14949c68 (diff)
parentb145d9b8734961d391dbb3a96612c71b0684d22a (diff)
downloadgitlab-ce-3f6f40b34705cc4d24a3d618117dff106e4d0ca0.tar.gz
Merge branch '25830-fix-label-creation-bug-for-bitbucket-import' into 'master'
Fix label creation within Bitbucket import if labels already exist Closes #58623 See merge request gitlab-org/gitlab-ce!27987
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/bitbucket_import/importer.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/bitbucket_import/importer.rb b/lib/gitlab/bitbucket_import/importer.rb
index 769d3279f91..c9f0ed66a54 100644
--- a/lib/gitlab/bitbucket_import/importer.rb
+++ b/lib/gitlab/bitbucket_import/importer.rb
@@ -135,7 +135,7 @@ module Gitlab
def create_labels
LABELS.each do |label_params|
- label = ::Labels::CreateService.new(label_params).execute(project: project)
+ label = ::Labels::FindOrCreateService.new(nil, project, label_params).execute(skip_authorization: true)
if label.valid?
@labels[label_params[:title]] = label
else