Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
佳 邓
Gitlab4j Api
Commits
639ca5a5
Commit
639ca5a5
authored
May 25, 2018
by
Greg Messner
Browse files
Added getParticipants() methods that return List.
parent
b96fd36b
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/org/gitlab4j/api/MergeRequestApi.java
View file @
639ca5a5
...
...
@@ -593,16 +593,48 @@ public class MergeRequestApi extends AbstractApi {
Response
response
=
get
(
Response
.
Status
.
OK
,
null
,
"projects"
,
projectId
,
"merge_requests"
,
mergeRequestIid
,
"changes"
);
return
(
response
.
readEntity
(
MergeRequest
.
class
));
}
/**
* Get list of participants of merge request.
*
* GET /projects/:id/merge_requests/:merge_request_iid/participants
*
* @param projectId the project ID to get the merge requests for
* @param mergeRequestIid the IID of the merge request to get
* @return a List containing all participants for the specified merge request
* @throws GitLabApiException if any exception occurs
*/
public
List
<
Participant
>
getParticipants
(
Integer
projectId
,
Integer
mergeRequestIid
)
throws
GitLabApiException
{
return
(
getParticipants
(
projectId
,
mergeRequestIid
,
1
,
getDefaultPerPage
()));
}
/**
* Get list of participants of merge request and in the specified page range.
*
* GET /projects/:id/merge_requests/:merge_request_iid/participants
*
* @param projectId the project ID to get the merge requests for
* @param mergeRequestIid the IID of the merge request to get
* @param page the page to get
* @param perPage the number of projects per page
* @return a List containing all participants for the specified merge request
* @throws GitLabApiException if any exception occurs
*/
public
List
<
Participant
>
getParticipants
(
Integer
projectId
,
Integer
mergeRequestIid
,
int
page
,
int
perPage
)
throws
GitLabApiException
{
Response
response
=
get
(
Response
.
Status
.
OK
,
getPageQueryParams
(
page
,
perPage
),
"projects"
,
projectId
,
"merge_requests"
,
mergeRequestIid
,
"participants"
);
return
(
response
.
readEntity
(
new
GenericType
<
List
<
Participant
>>()
{
}));
}
/**
* Get participants of merge request.
*
* Get
a Pager of the
participants of merge request.
*
* GET /projects/:id/merge_requests/:merge_request_iid/participants
*
*
* @param projectId the project ID to get the merge requests for
* @param mergeRequestIid the IID of the merge request to get
* @param itemsPerPage the number of Participant instances that will be fetched per page
* @return all participants for the specified merge request
* @return
a Pager containing
all participants for the specified merge request
* @throws GitLabApiException if any exception occurs
*/
public
Pager
<
Participant
>
getParticipants
(
Integer
projectId
,
Integer
mergeRequestIid
,
int
itemsPerPage
)
throws
GitLabApiException
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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