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:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-09-10 09:09:03 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-09-10 09:09:03 +0300
commitff2b80a5548b308f31acce94069bb3fd2e0480c3 (patch)
tree770d28f6674f76490b3d34a1c0d7b838f17cdf67 /lib/gitlab
parentdb6b854ea711b395c17827a5047f54dc29b518f9 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab')
-rw-r--r--lib/gitlab/github_import/importer/diff_note_importer.rb3
-rw-r--r--lib/gitlab/github_import/representation/diff_note.rb3
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/gitlab/github_import/importer/diff_note_importer.rb b/lib/gitlab/github_import/importer/diff_note_importer.rb
index 9bda066efcc..4cfc920e2e3 100644
--- a/lib/gitlab/github_import/importer/diff_note_importer.rb
+++ b/lib/gitlab/github_import/importer/diff_note_importer.rb
@@ -24,13 +24,14 @@ module Gitlab
note_body = MarkdownText.format(note.note, note.author, author_found)
attributes = {
+ discussion_id: Discussion.discussion_id(note),
noteable_type: 'MergeRequest',
noteable_id: mr_id,
project_id: project.id,
author_id: author_id,
note: note_body,
system: false,
- commit_id: note.commit_id,
+ commit_id: note.original_commit_id,
line_code: note.line_code,
type: 'LegacyDiffNote',
created_at: note.created_at,
diff --git a/lib/gitlab/github_import/representation/diff_note.rb b/lib/gitlab/github_import/representation/diff_note.rb
index d336b1ba797..d0584cc6255 100644
--- a/lib/gitlab/github_import/representation/diff_note.rb
+++ b/lib/gitlab/github_import/representation/diff_note.rb
@@ -11,7 +11,7 @@ module Gitlab
expose_attribute :noteable_type, :noteable_id, :commit_id, :file_path,
:diff_hunk, :author, :note, :created_at, :updated_at,
- :github_id
+ :github_id, :original_commit_id
NOTEABLE_ID_REGEX = %r{/pull/(?<iid>\d+)}i.freeze
@@ -34,6 +34,7 @@ module Gitlab
noteable_id: matches[:iid].to_i,
file_path: note.path,
commit_id: note.commit_id,
+ original_commit_id: note.original_commit_id,
diff_hunk: note.diff_hunk,
author: user,
note: note.body,