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:
Diffstat (limited to 'lib/gitlab/github_import/importer/note_importer.rb')
-rw-r--r--lib/gitlab/github_import/importer/note_importer.rb11
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/gitlab/github_import/importer/note_importer.rb b/lib/gitlab/github_import/importer/note_importer.rb
index 673f56b5753..1410006af26 100644
--- a/lib/gitlab/github_import/importer/note_importer.rb
+++ b/lib/gitlab/github_import/importer/note_importer.rb
@@ -21,14 +21,12 @@ module Gitlab
author_id, author_found = user_finder.author_id_for(note)
- note_body = MarkdownText.format(note.note, note.author, author_found)
-
attributes = {
noteable_type: note.noteable_type,
noteable_id: noteable_id,
project_id: project.id,
author_id: author_id,
- note: note_body,
+ note: note_body(author_found),
discussion_id: note.discussion_id,
system: false,
created_at: note.created_at,
@@ -48,6 +46,13 @@ module Gitlab
def find_noteable_id
GithubImport::IssuableFinder.new(project, note).database_id
end
+
+ private
+
+ def note_body(author_found)
+ text = MarkdownText.convert_ref_links(note.note, project)
+ MarkdownText.format(text, note.author, author_found)
+ end
end
end
end