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_review_importer.rb')
-rw-r--r--lib/gitlab/github_import/importer/pull_request_review_importer.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/gitlab/github_import/importer/pull_request_review_importer.rb b/lib/gitlab/github_import/importer/pull_request_review_importer.rb
index b11af90aa6f..de66f310edf 100644
--- a/lib/gitlab/github_import/importer/pull_request_review_importer.rb
+++ b/lib/gitlab/github_import/importer/pull_request_review_importer.rb
@@ -4,6 +4,9 @@ module Gitlab
module GithubImport
module Importer
class PullRequestReviewImporter
+ # review - An instance of `Gitlab::GithubImport::Representation::PullRequestReview`
+ # project - An instance of `Project`
+ # client - An instance of `Gitlab::GithubImport::Client`
def initialize(review, project, client)
@review = review
@project = project
@@ -13,7 +16,12 @@ module Gitlab
def execute
user_finder = GithubImport::UserFinder.new(project, client)
- gitlab_user_id = user_finder.user_id_for(review.author)
+
+ gitlab_user_id = begin
+ user_finder.user_id_for(review.author)
+ rescue ::Octokit::NotFound
+ nil
+ end
if gitlab_user_id
add_review_note!(gitlab_user_id)