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:
Diffstat (limited to 'lib/gitlab/github_import/importer/pull_request_importer.rb')
-rw-r--r--lib/gitlab/github_import/importer/pull_request_importer.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/gitlab/github_import/importer/pull_request_importer.rb b/lib/gitlab/github_import/importer/pull_request_importer.rb
index 3c17ea1195e..5690a2cc997 100644
--- a/lib/gitlab/github_import/importer/pull_request_importer.rb
+++ b/lib/gitlab/github_import/importer/pull_request_importer.rb
@@ -61,6 +61,9 @@ module Gitlab
updated_at: pull_request.updated_at
}
+ mr = project.merge_requests.new(attributes.merge(importing: true))
+ mr.validate!
+
create_merge_request_without_hooks(project, attributes, pull_request.iid)
end
@@ -93,7 +96,7 @@ module Gitlab
return if project.repository.branch_exists?(source_branch)
project.repository.add_branch(project.creator, source_branch, pull_request.source_branch_sha)
- rescue Gitlab::Git::CommandError => e
+ rescue Gitlab::Git::PreReceiveError, Gitlab::Git::CommandError => e
Gitlab::ErrorTracking.track_exception(e,
source_branch: source_branch,
project_id: merge_request.project.id,