public class CommitsApi extends AbstractApi
Constants.PipelineOrderBy, Constants.PipelineScope, Constants.ProjectOrderBy, Constants.SortOrder
NEXT_PAGE_HEADER, PAGE_HEADER, PAGE_PARAM, PER_PAGE, PER_PAGE_PARAM, PREV_PAGE_HEADER, TOTAL_HEADER, TOTAL_PAGES_HEADER
Constructor and Description |
---|
CommitsApi(GitLabApi gitLabApi) |
Modifier and Type | Method and Description |
---|---|
Commit |
getCommit(int projectId,
String sha)
Get a specific commit identified by the commit hash or name of a branch or tag.
|
List<Commit> |
getCommits(int projectId)
Get a list of repository commits in a project.
|
Pager<Commit> |
getCommits(int projectId,
int itemsPerPage)
Get a Pager of repository commits in a project.
|
List<Commit> |
getCommits(int projectId,
int page,
int perPage)
Get a list of repository commits in a project.
|
Diff |
getDiff(int projectId,
String sha)
Get the diff of a commit in a project.
|
addFormParam, addFormParam, delete, delete, get, get, getApiClient, getApiVersion, getDefaultPerPage, getDefaultPerPageParam, getPageQueryParams, handle, isApiVersion, post, post, post, put, put, urlEncode, validate
public CommitsApi(GitLabApi gitLabApi)
public List<Commit> getCommits(int projectId) throws GitLabApiException
projectId
- the project ID to get the list of commits forGitLabApiException
- GitLabApiException if any exception occurs during executionpublic List<Commit> getCommits(int projectId, int page, int perPage) throws GitLabApiException
projectId
- the project ID to get the list of commits forpage
- the page to getperPage
- the number of commits per pageGitLabApiException
- GitLabApiException if any exception occurs during executionpublic Pager<Commit> getCommits(int projectId, int itemsPerPage) throws GitLabApiException
projectId
- the project ID to get the list of commits foritemsPerPage
- the number of Commit instances that will be fetched per pageGitLabApiException
- GitLabApiException if any exception occurs during executionpublic Commit getCommit(int projectId, String sha) throws GitLabApiException
projectId
- the project ID that the commit belongs tosha
- a commit hash or name of a branch or tagGitLabApiException
- GitLabApiException if any exception occurs during executionpublic Diff getDiff(int projectId, String sha) throws GitLabApiException
projectId
- the project ID that the commit belongs tosha
- a commit hash or name of a branch or tagGitLabApiException
- GitLabApiException if any exception occurs during executionCopyright © 2017. All rights reserved.