Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
da88f61b
Commit
da88f61b
authored
Jul 31, 2018
by
Stan Hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve formatting of fallback diff note
parent
a9d359b4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
lib/gitlab/bitbucket_server_import/importer.rb
lib/gitlab/bitbucket_server_import/importer.rb
+6
-1
No files found.
lib/gitlab/bitbucket_server_import/importer.rb
View file @
da88f61b
...
...
@@ -261,8 +261,13 @@ module Gitlab
def
create_fallback_diff_note
(
merge_request
,
comment
,
position
)
attributes
=
pull_request_comment_attributes
(
comment
)
attributes
[
:note
]
=
"*Comment on
#{
position
.
old_path
}
:
#{
position
.
old_line
}
->
#{
position
.
new_path
}
:
#{
position
.
new_line
}
*
\n\n
"
+
attributes
[
:note
]
note
=
"*Comment on "
note
+=
"
#{
position
.
old_path
}
:
#{
position
.
old_line
}
-->"
if
position
.
old_line
note
+=
"
#{
position
.
new_path
}
:
#{
position
.
new_line
}
"
if
position
.
new_line
new
+=
"*
\n\n
#{
comment
.
note
}
"
attributes
[
:note
]
=
note
merge_request
.
notes
.
create!
(
attributes
)
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment