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
Boxiang Sun
gitlab-ce
Commits
615e1807
Commit
615e1807
authored
Jun 26, 2018
by
Stan Hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More work towards importing pull requests
parent
a5ca56ee
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
lib/bitbucket_server/client.rb
lib/bitbucket_server/client.rb
+4
-3
lib/gitlab/bitbucket_server_import/importer.rb
lib/gitlab/bitbucket_server_import/importer.rb
+2
-2
No files found.
lib/bitbucket_server/client.rb
View file @
615e1807
...
...
@@ -21,9 +21,10 @@ module BitbucketServer
get_collection
(
path
,
:pull_request
)
end
def
pull_request_comments
(
project_key
,
repo
,
pull_request
)
path
=
"/projects/
#{
project_key
}
/repos/
#{
repo
}
/pull-requests/
#{
pull_request
}
/comments"
get_collection
(
path
,
:pull_request_comment
)
def
activities
(
project_key
,
repo
,
pull_request
)
path
=
"/projects/
#{
project_key
}
/repos/
#{
repo
}
/pull-requests/
#{
pull_request
}
/activities"
collection
=
get_collection
(
path
,
:activities
)
end
def
pull_request_diff
(
project_key
,
repo
,
pull_request
)
...
...
lib/gitlab/bitbucket_server_import/importer.rb
View file @
615e1807
...
...
@@ -97,9 +97,9 @@ module Gitlab
end
def
import_pull_request_comments
(
pull_request
,
merge_request
)
comments
=
client
.
pull_request_comments
(
repo
,
pull_request
.
iid
)
comments
=
client
.
activities
(
repo
,
pull_request
.
iid
).
select
(
&
:commment?
)
inline_comments
,
pr_comments
=
comments
.
partition
(
&
:inline?
)
inline_comments
,
pr_comments
=
comments
.
partition
(
&
:inline
_comment
?
)
import_inline_comments
(
inline_comments
,
pull_request
,
merge_request
)
import_standalone_pr_comments
(
pr_comments
,
merge_request
)
...
...
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