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
a19a5b57
Commit
a19a5b57
authored
Jul 17, 2018
by
Stan Hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve formatting of diff notes that could not be imported
parent
d1afb7c9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
lib/gitlab/bitbucket_server_import/importer.rb
lib/gitlab/bitbucket_server_import/importer.rb
+1
-1
spec/lib/gitlab/bitbucket_server_import/importer_spec.rb
spec/lib/gitlab/bitbucket_server_import/importer_spec.rb
+1
-1
No files found.
lib/gitlab/bitbucket_server_import/importer.rb
View file @
a19a5b57
...
@@ -251,7 +251,7 @@ module Gitlab
...
@@ -251,7 +251,7 @@ module Gitlab
def
create_fallback_diff_note
(
merge_request
,
comment
)
def
create_fallback_diff_note
(
merge_request
,
comment
)
attributes
=
pull_request_comment_attributes
(
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
)
merge_request
.
notes
.
create!
(
attributes
)
end
end
...
...
spec/lib/gitlab/bitbucket_server_import/importer_spec.rb
View file @
a19a5b57
...
@@ -199,7 +199,7 @@ describe Gitlab::BitbucketServerImport::Importer do
...
@@ -199,7 +199,7 @@ describe Gitlab::BitbucketServerImport::Importer do
expect
(
merge_request
.
notes
.
count
).
to
eq
(
1
)
expect
(
merge_request
.
notes
.
count
).
to
eq
(
1
)
note
=
merge_request
.
notes
.
first
note
=
merge_request
.
notes
.
first
expect
(
note
.
note
).
to
start_with
(
'Comment on file:'
)
expect
(
note
.
note
).
to
start_with
(
'
*
Comment on file:'
)
end
end
it
'restores branches of inaccessible SHAs'
do
it
'restores branches of inaccessible SHAs'
do
...
...
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