diff options
author | Stan Hu <stanhu@gmail.com> | 2018-07-18 07:42:07 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2018-07-18 07:42:07 +0300 |
commit | a19a5b57e464e53ad6e92c69f1e16f7cc0b27718 (patch) | |
tree | aeeef4af9cee40e4618297384ec03b291481300f | |
parent | d1afb7c9e50399d4f7f397d1e3be2df13d49427e (diff) |
Improve formatting of diff notes that could not be imported
-rw-r--r-- | lib/gitlab/bitbucket_server_import/importer.rb | 2 | ||||
-rw-r--r-- | spec/lib/gitlab/bitbucket_server_import/importer_spec.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/bitbucket_server_import/importer.rb b/lib/gitlab/bitbucket_server_import/importer.rb index 93fa7a0f4d4..3db3ebfc80a 100644 --- a/lib/gitlab/bitbucket_server_import/importer.rb +++ b/lib/gitlab/bitbucket_server_import/importer.rb @@ -251,7 +251,7 @@ module Gitlab def create_fallback_diff_note(merge_request, comment) attributes = pull_request_comment_attributes(comment) - attributes[:note] = "Comment on file: #{comment.file_path}, old position: #{comment.old_pos}, new_position: #{comment.new_pos}\n\n" + attributes[:note] + attributes[:note] = "*Comment on file: #{comment.file_path}, old line: #{comment.old_pos}, new line: #{comment.new_pos}*\n\n" + attributes[:note] merge_request.notes.create!(attributes) end diff --git a/spec/lib/gitlab/bitbucket_server_import/importer_spec.rb b/spec/lib/gitlab/bitbucket_server_import/importer_spec.rb index 44d5b551838..a3e1940af04 100644 --- a/spec/lib/gitlab/bitbucket_server_import/importer_spec.rb +++ b/spec/lib/gitlab/bitbucket_server_import/importer_spec.rb @@ -199,7 +199,7 @@ describe Gitlab::BitbucketServerImport::Importer do expect(merge_request.notes.count).to eq(1) note = merge_request.notes.first - expect(note.note).to start_with('Comment on file:') + expect(note.note).to start_with('*Comment on file:') end it 'restores branches of inaccessible SHAs' do |