public class MergeRequestApi extends AbstractApi
Constants.JobScope, Constants.PipelineOrderBy, Constants.PipelineScope, Constants.ProjectOrderBy, Constants.SortOrderNEXT_PAGE_HEADER, PAGE_HEADER, PAGE_PARAM, PER_PAGE, PER_PAGE_PARAM, PREV_PAGE_HEADER, TOTAL_HEADER, TOTAL_PAGES_HEADER| Constructor and Description |
|---|
MergeRequestApi(GitLabApi gitLabApi) |
| Modifier and Type | Method and Description |
|---|---|
MergeRequest |
createMergeRequest(Integer projectId,
String sourceBranch,
String targetBranch,
String title,
String description,
Integer assigneeId)
Creates a merge request and optionally assigns a reviewer to it.
|
MergeRequest |
getMergeRequest(Integer projectId,
Integer mergeRequestId)
Get information about a single merge request.
|
List<MergeRequest> |
getMergeRequests(Integer projectId)
Get all merge requests for the specified project.
|
Pager<MergeRequest> |
getMergeRequests(Integer projectId,
int itemsPerPage)
Get all merge requests for the specified project.
|
List<MergeRequest> |
getMergeRequests(Integer projectId,
int page,
int perPage)
Get all merge requests for the specified project.
|
MergeRequest |
updateMergeRequest(Integer projectId,
Integer mergeRequestId,
String sourceBranch,
String targetBranch,
String title,
String description,
Integer assigneeId)
Updates an existing merge request.
|
addFormParam, addFormParam, delete, delete, get, get, getApiClient, getApiVersion, getDefaultPerPage, getDefaultPerPageParam, getPageQueryParams, getWithAccepts, handle, isApiVersion, post, post, post, put, put, urlEncode, validatepublic MergeRequestApi(GitLabApi gitLabApi)
public List<MergeRequest> getMergeRequests(Integer projectId) throws GitLabApiException
projectId - the project ID to get the merge requests forGitLabApiException - if any exception occurspublic List<MergeRequest> getMergeRequests(Integer projectId, int page, int perPage) throws GitLabApiException
projectId - the project ID to get the merge requests forpage - the page to getperPage - the number of MergeRequest instances per pageGitLabApiException - if any exception occurspublic Pager<MergeRequest> getMergeRequests(Integer projectId, int itemsPerPage) throws GitLabApiException
projectId - the project ID to get the merge requests foritemsPerPage - the number of MergeRequest instances that will be fetched per pageGitLabApiException - if any exception occurspublic MergeRequest getMergeRequest(Integer projectId, Integer mergeRequestId) throws GitLabApiException
projectId - the project ID of the merge requestmergeRequestId - the ID of the merge requestGitLabApiException - if any exception occurspublic MergeRequest createMergeRequest(Integer projectId, String sourceBranch, String targetBranch, String title, String description, Integer assigneeId) throws GitLabApiException
projectId - the ID of a project, requiredsourceBranch - the source branch, requiredtargetBranch - the target branch, requiredtitle - the title for the merge request, requireddescription - the description of the merge requestassigneeId - the Assignee user ID, optionalGitLabApiException - if any exception occurspublic MergeRequest updateMergeRequest(Integer projectId, Integer mergeRequestId, String sourceBranch, String targetBranch, String title, String description, Integer assigneeId) throws GitLabApiException
projectId - the ID of a projectmergeRequestId - the ID of the merge request to updatesourceBranch - the source branchtargetBranch - the target branchtitle - the title for the merge requestdescription - the description of the merge requestassigneeId - the Assignee user ID, optionalGitLabApiException - if any exception occursCopyright © 2017. All rights reserved.