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:
authorStan Hu <stanhu@gmail.com>2018-06-28 10:27:04 +0300
committerStan Hu <stanhu@gmail.com>2018-06-28 10:27:04 +0300
commit014abc9c07c1389e64ccf336559b488835730a45 (patch)
tree94f44ff09f543fe5c349dd07bc9659150d384b54 /lib/gitlab/bitbucket_server_import
parent5728ffbf12c8f5f767bc6d6b9a453b2add974e96 (diff)
Handle threaded comments and prepare for inline comments
Diffstat (limited to 'lib/gitlab/bitbucket_server_import')
-rw-r--r--lib/gitlab/bitbucket_server_import/importer.rb9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/gitlab/bitbucket_server_import/importer.rb b/lib/gitlab/bitbucket_server_import/importer.rb
index 43a52a61ee5..f8871ade6e7 100644
--- a/lib/gitlab/bitbucket_server_import/importer.rb
+++ b/lib/gitlab/bitbucket_server_import/importer.rb
@@ -105,11 +105,11 @@ module Gitlab
inline_comments, pr_comments = comments.partition(&:inline_comment?)
# import_inline_comments(inline_comments, pull_request, merge_request)
- import_standalone_pr_comments(pr_comments, merge_request)
+ import_standalone_pr_comments(pr_comments.map(&:comment), merge_request)
end
def import_merge_event(merge_request, merge_event)
- committer = merge_event.commiter_email
+ committer = merge_event.committer_email
return unless committer
@@ -169,6 +169,10 @@ module Gitlab
pr_comments.each do |comment|
begin
merge_request.notes.create!(pull_request_comment_attributes(comment))
+
+ comment.comments.each do |replies|
+ merge_request.notes.create!(pull_request_comment_attributes(replies))
+ end
rescue StandardError => e
errors << { type: :pull_request, iid: comment.id, errors: e.message }
end
@@ -180,7 +184,6 @@ module Gitlab
end
def pull_request_comment_attributes(comment)
- byebug
{
project: project,
note: comment.note,