summaryrefslogtreecommitdiff
path: root/lib/gitlab/bitbucket_server_import
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2018-07-31 11:33:37 -0700
committerStan Hu <stanhu@gmail.com>2018-07-31 11:33:37 -0700
commit0085b76fb387237af02f717a894c89f7227cb81e (patch)
tree47243df8ac965f643436078f315858190c55950c /lib/gitlab/bitbucket_server_import
parent710d82104d457ff40cc820e5953f8cd8777c49d1 (diff)
downloadgitlab-ce-0085b76fb387237af02f717a894c89f7227cb81e.tar.gz
Give some context on threaded discussions
Diffstat (limited to 'lib/gitlab/bitbucket_server_import')
-rw-r--r--lib/gitlab/bitbucket_server_import/importer.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/gitlab/bitbucket_server_import/importer.rb b/lib/gitlab/bitbucket_server_import/importer.rb
index 339b15ab13a..74ae6bc1ba5 100644
--- a/lib/gitlab/bitbucket_server_import/importer.rb
+++ b/lib/gitlab/bitbucket_server_import/importer.rb
@@ -293,9 +293,17 @@ module Gitlab
end
def pull_request_comment_attributes(comment)
+ note =
+ # Provide some context for replying
+ if comment.parent_comment
+ "> #{comment.parent_comment.note.truncate(80)}\n\n#{comment.note}"
+ else
+ comment.note
+ end
+
{
project: project,
- note: comment.note,
+ note: note,
author_id: gitlab_user_id(comment.author_email),
created_at: comment.created_at,
updated_at: comment.updated_at