public class CommitsApi extends AbstractApi
| Constructor and Description |
|---|
CommitsApi(GitLabApi gitLabApi) |
| Modifier and Type | Method and Description |
|---|---|
List<Commit> |
getCommits(int projectId)
Get a list of repository commits in a project.
|
Commit |
getCommits(int projectId,
String sha)
Get a specific commit identified by the commit hash or name of a branch or tag.
|
Diff |
getDiff(int projectId,
String sha)
Get the diff of a commit in a project.
|
addFormParam, addFormParam, delete, delete, get, get, getApiClient, handle, post, post, post, put, put, 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 Commit getCommits(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.