summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGeorge Koltsov <gkoltsov@gitlab.com>2019-08-08 10:26:37 +0100
committerGeorge Koltsov <gkoltsov@gitlab.com>2019-08-08 13:16:33 +0100
commitba429a6e2023242a55f9199b1381ac331cc92e1c (patch)
tree9f02ca8e7bf79e27962419a2d4d58c1871aa5978 /lib
parent9baa7ee14f1e404b1e3ba74512fd2fc026c70276 (diff)
downloadgitlab-ce-ba429a6e2023242a55f9199b1381ac331cc92e1c.tar.gz
Apply code review feedback
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/bitbucket_import/importer.rb10
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/gitlab/bitbucket_import/importer.rb b/lib/gitlab/bitbucket_import/importer.rb
index e017b30050f..9560b187292 100644
--- a/lib/gitlab/bitbucket_import/importer.rb
+++ b/lib/gitlab/bitbucket_import/importer.rb
@@ -260,20 +260,18 @@ module Gitlab
end
def pull_request_comment_attributes(comment)
- author_id = gitlab_user_id(project, comment.author)
-
{
project: project,
- note: comment_note(comment, author_id),
- author_id: author_id,
+ note: comment_note(comment),
+ author_id: gitlab_user_id(project, comment.author),
created_at: comment.created_at,
updated_at: comment.updated_at
}
end
- def comment_note(comment, author_id)
+ def comment_note(comment)
note = ''
- note += @formatter.author_line(comment.author) if author_id == project.creator_id
+ note += @formatter.author_line(comment.author) unless find_user_id(comment.author)
note + comment.note
end