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:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-05-19 18:44:42 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-05-19 18:44:42 +0300
commit4555e1b21c365ed8303ffb7a3325d773c9b8bf31 (patch)
tree5423a1c7516cffe36384133ade12572cf709398d /lib/gitlab/legacy_github_import
parente570267f2f6b326480d284e0164a6464ba4081bc (diff)
Add latest changes from gitlab-org/gitlab@13-12-stable-eev13.12.0-rc42
Diffstat (limited to 'lib/gitlab/legacy_github_import')
-rw-r--r--lib/gitlab/legacy_github_import/importer.rb12
-rw-r--r--lib/gitlab/legacy_github_import/label_formatter.rb2
2 files changed, 7 insertions, 7 deletions
diff --git a/lib/gitlab/legacy_github_import/importer.rb b/lib/gitlab/legacy_github_import/importer.rb
index a17e3b1ad5c..fc5834613fd 100644
--- a/lib/gitlab/legacy_github_import/importer.rb
+++ b/lib/gitlab/legacy_github_import/importer.rb
@@ -94,7 +94,7 @@ module Gitlab
labels.each do |raw|
gh_label = LabelFormatter.new(project, raw)
gh_label.create!
- rescue => e
+ rescue StandardError => e
errors << { type: :label, url: Gitlab::UrlSanitizer.sanitize(gh_label.url), errors: e.message }
end
end
@@ -107,7 +107,7 @@ module Gitlab
milestones.each do |raw|
gh_milestone = MilestoneFormatter.new(project, raw)
gh_milestone.create!
- rescue => e
+ rescue StandardError => e
errors << { type: :milestone, url: Gitlab::UrlSanitizer.sanitize(gh_milestone.url), errors: e.message }
end
end
@@ -128,7 +128,7 @@ module Gitlab
end
apply_labels(issuable, raw)
- rescue => e
+ rescue StandardError => e
errors << { type: :issue, url: Gitlab::UrlSanitizer.sanitize(gh_issue.url), errors: e.message }
end
end
@@ -153,7 +153,7 @@ module Gitlab
if project.gitea_import?
apply_labels(merge_request, raw)
end
- rescue => e
+ rescue StandardError => e
errors << { type: :pull_request, url: Gitlab::UrlSanitizer.sanitize(gh_pull_request.url), errors: e.message }
ensure
clean_up_restored_branches(gh_pull_request)
@@ -236,7 +236,7 @@ module Gitlab
next unless issuable
issuable.notes.create!(comment.attributes)
- rescue => e
+ rescue StandardError => e
errors << { type: :comment, url: Gitlab::UrlSanitizer.sanitize(raw.url), errors: e.message }
end
end
@@ -280,7 +280,7 @@ module Gitlab
releases.each do |raw|
gh_release = ReleaseFormatter.new(project, raw)
gh_release.create! if gh_release.valid?
- rescue => e
+ rescue StandardError => e
errors << { type: :release, url: Gitlab::UrlSanitizer.sanitize(gh_release.url), errors: e.message }
end
end
diff --git a/lib/gitlab/legacy_github_import/label_formatter.rb b/lib/gitlab/legacy_github_import/label_formatter.rb
index 0b6e4612843..415b1b8878f 100644
--- a/lib/gitlab/legacy_github_import/label_formatter.rb
+++ b/lib/gitlab/legacy_github_import/label_formatter.rb
@@ -20,7 +20,7 @@ module Gitlab
service = ::Labels::FindOrCreateService.new(nil, project, params)
label = service.execute(skip_authorization: true)
- raise ActiveRecord::RecordInvalid.new(label) unless label.persisted?
+ raise ActiveRecord::RecordInvalid, label unless label.persisted?
label
end