From ba429a6e2023242a55f9199b1381ac331cc92e1c Mon Sep 17 00:00:00 2001 From: George Koltsov Date: Thu, 8 Aug 2019 10:26:37 +0100 Subject: Apply code review feedback --- lib/gitlab/bitbucket_import/importer.rb | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'lib') 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 -- cgit v1.2.1