public class CommitsApi 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 |
|---|
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.
|
List<Commit> |
getCommits(int projectId,
String ref,
Date since,
Date until)
Get a list of repository commits in a project.
|
Pager<Commit> |
getCommits(int projectId,
String ref,
Date since,
Date until,
int itemsPerPage)
Get a Pager of repository commits in a project.
|
List<Commit> |
getCommits(int projectId,
String ref,
Date since,
Date until,
int page,
int perPage)
Get a list of repository commits in a project.
|
List<Diff> |
getDiff(int projectId,
String sha)
Get the list of diffs of a commit in a project.
|
List<Diff> |
getDiff(String projectPath,
String sha)
Get the list of diffs of a commit in a project.
|
addFormParam, addFormParam, delete, delete, get, get, getApiClient, getApiVersion, getDefaultPerPage, getDefaultPerPageParam, getPageQueryParams, getWithAccepts, handle, isApiVersion, post, post, post, put, put, urlEncode, validatepublic 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 List<Commit> getCommits(int projectId, String ref, Date since, Date until) throws GitLabApiException
projectId - the project ID to get the list of commits forref - the name of a repository branch or tag or if not given the default branchsince - only commits after or on this date will be returneduntil - only commits before or on this date will be returnedGitLabApiException - GitLabApiException if any exception occurs during executionpublic List<Commit> getCommits(int projectId, String ref, Date since, Date until, int page, int perPage) throws GitLabApiException
projectId - the project ID to get the list of commits forref - the name of a repository branch or tag or if not given the default branchsince - only commits after or on this date will be returneduntil - only commits before or on this date will be returnedpage - the page to getperPage - the number of commits per pageGitLabApiException - GitLabApiException if any exception occurs during executionpublic Pager<Commit> getCommits(int projectId, String ref, Date since, Date until, int itemsPerPage) throws GitLabApiException
projectId - the project ID to get the list of commits forref - the name of a repository branch or tag or if not given the default branchsince - only commits after or on this date will be returneduntil - only commits before or on this date will be returneditemsPerPage - 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 List<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 executionpublic List<Diff> getDiff(String projectPath, String sha) throws GitLabApiException
projectPath - the project path 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.