public class CommitsApi extends AbstractApi
Constants.ActionType, Constants.ApplicationScope, Constants.ArchiveFormat, Constants.CommitBuildState, Constants.DeploymentStatus, Constants.DeployTokenScope, Constants.Encoding, Constants.EpicOrderBy, Constants.GroupOrderBy, Constants.GroupSearchScope, Constants.ImpersonationState, Constants.IssueOrderBy, Constants.IssueScope, Constants.IssueState, Constants.JobScope, Constants.LineType, Constants.MergeRequestOrderBy, Constants.MergeRequestScope, Constants.MergeRequestSearchIn, Constants.MergeRequestState, Constants.MilestoneState, Constants.PipelineOrderBy, Constants.PipelineScope, Constants.ProjectOrderBy, Constants.ProjectSearchScope, Constants.SearchScope, Constants.SortOrder, Constants.StateEvent, Constants.TagOrderBy, Constants.TargetType, Constants.TodoAction, Constants.TodoState, Constants.TodoType, Constants.TokenType
gitLabApi
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 |
---|---|
Comment |
addComment(Object projectIdOrPath,
String sha,
String note)
Add a comment to a commit.
|
Comment |
addComment(Object projectIdOrPath,
String sha,
String note,
String path,
Integer line,
Constants.LineType lineType)
Add a comment to a commit.
|
CommitStatus |
addCommitStatus(Object projectIdOrPath,
String sha,
Constants.CommitBuildState state,
CommitStatus status)
Add or update the build status of a commit.
|
Commit |
cherryPickCommit(Object projectIdOrPath,
String sha,
String branch)
Cherry picks a commit in a given branch.
|
Commit |
createCommit(Object projectIdOrPath,
CommitPayload payload)
Create a commit with multiple files and actions.
|
Commit |
createCommit(Object projectIdOrPath,
String branch,
String commitMessage,
String startBranch,
String authorEmail,
String authorName,
CommitAction action)
Create a commit with single file and action.
|
Commit |
createCommit(Object projectIdOrPath,
String branch,
String commitMessage,
String startBranch,
String authorEmail,
String authorName,
List<CommitAction> actions)
Create a commit with multiple files and actions.
|
List<Comment> |
getComments(Object projectIdOrPath,
String sha)
Get the comments of a commit in a project.
|
Pager<Comment> |
getComments(Object projectIdOrPath,
String sha,
int itemsPerPage)
Get a Pager of the comments of a commit in a project.
|
Stream<Comment> |
getCommentsStream(Object projectIdOrPath,
String sha)
Get the comments of a commit in a project as a Stream.
|
Commit |
getCommit(Object projectIdOrPath,
String sha)
Get a specific commit identified by the commit hash or name of a branch or tag.
|
List<CommitRef> |
getCommitRefs(Object projectIdOrPath,
String sha)
Get a List of all references (from branches or tags) a commit is pushed to.
|
List<CommitRef> |
getCommitRefs(Object projectIdOrPath,
String sha,
CommitRef.RefType refType)
Get a List of all references (from branches or tags) a commit is pushed to.
|
Pager<CommitRef> |
getCommitRefs(Object projectIdOrPath,
String sha,
CommitRef.RefType refType,
int itemsPerPage)
Get a Pager of references (from branches or tags) a commit is pushed to.
|
Pager<CommitRef> |
getCommitRefs(Object projectIdOrPath,
String sha,
int itemsPerPage)
Get a Pager of references (from branches or tags) a commit is pushed to.
|
Stream<CommitRef> |
getCommitRefsStream(Object projectIdOrPath,
String sha)
Get a Stream of all references (from branches or tags) a commit is pushed to.
|
Stream<CommitRef> |
getCommitRefsStream(Object projectIdOrPath,
String sha,
CommitRef.RefType refType)
Get a Stream of all references (from branches or tags) a commit is pushed to.
|
List<Commit> |
getCommits(Object projectIdOrPath)
Get a list of all repository commits in a project.
|
Pager<Commit> |
getCommits(Object projectIdOrPath,
int itemsPerPage)
Get a Pager of all repository commits in a project.
|
List<Commit> |
getCommits(Object projectIdOrPath,
int page,
int perPage)
Deprecated.
|
List<Commit> |
getCommits(Object projectIdOrPath,
String ref,
Date since,
Date until)
Get a list of repository commits in a project.
|
Pager<Commit> |
getCommits(Object projectIdOrPath,
String ref,
Date since,
Date until,
int itemsPerPage)
Get a Pager of repository commits in a project.
|
List<Commit> |
getCommits(Object projectIdOrPath,
String ref,
Date since,
Date until,
int page,
int perPage)
Deprecated.
|
List<Commit> |
getCommits(Object projectIdOrPath,
String ref,
Date since,
Date until,
String path)
Get a list of repository commits in a project.
|
List<Commit> |
getCommits(Object projectIdOrPath,
String ref,
Date since,
Date until,
String path,
Boolean all,
Boolean withStats,
Boolean firstParent)
Get a List of the specified repository commits in a project
|
Pager<Commit> |
getCommits(Object projectIdOrPath,
String ref,
Date since,
Date until,
String path,
Boolean all,
Boolean withStats,
Boolean firstParent,
int itemsPerPage)
Get a Pager of the specified repository commits in a project
|
Pager<Commit> |
getCommits(Object projectIdOrPath,
String ref,
Date since,
Date until,
String path,
int itemsPerPage)
Get a Pager of repository commits in a project
|
List<Commit> |
getCommits(Object projectIdOrPath,
String ref,
Date since,
Date until,
String path,
int page,
int perPage)
Deprecated.
|
List<Commit> |
getCommits(Object projectIdOrPath,
String ref,
String path)
Get a list of file commits in a project
|
Stream<Commit> |
getCommitsStream(Object projectIdOrPath,
String ref,
Date since,
Date until)
Get a Stream of repository commits in a project.
|
Stream<Commit> |
getCommitsStream(Object projectIdOrPath,
String ref,
Date since,
Date until,
String path)
Get a Stream of repository commits in a project.
|
Stream<Commit> |
getCommitsStream(Object projectIdOrPath,
String ref,
Date since,
Date until,
String path,
Boolean all,
Boolean withStats,
Boolean firstParent)
Get a Stream of the specified repository commits in a project
|
List<CommitStatus> |
getCommitStatuses(Object projectIdOrPath,
String sha,
CommitStatusFilter filter)
Get a list of repository commit statuses that meet the provided filter.
|
Pager<CommitStatus> |
getCommitStatuses(Object projectIdOrPath,
String sha,
CommitStatusFilter filter,
int itemsPerPage)
Get a Pager of repository commit statuses that meet the provided filter.
|
List<CommitStatus> |
getCommitStatuses(Object projectIdOrPath,
String sha,
CommitStatusFilter filter,
int page,
int perPage)
Get a list of repository commit statuses that meet the provided filter.
|
Stream<CommitStatus> |
getCommitStatusesStream(Object projectIdOrPath,
String sha,
CommitStatusFilter filter)
Get a Stream of repository commit statuses that meet the provided filter.
|
Stream<Commit> |
getCommitStream(Object projectIdOrPath)
Get a Stream of all repository commits in a project.
|
List<Diff> |
getDiff(Object projectIdOrPath,
String sha)
Get the list of diffs of a commit in a project.
|
Pager<Diff> |
getDiff(Object projectIdOrPath,
String sha,
int itemsPerPage)
Get the Pager of diffs of a commit in a project.
|
Stream<Diff> |
getDiffStream(Object projectIdOrPath,
String sha)
Get the Diff of diffs of a commit in a project.
|
GpgSignature |
getGpgSignature(Object projectIdOrPath,
String sha)
Get the GPG signature from a commit, if it is signed.
|
List<MergeRequest> |
getMergeRequests(Object projectIdOrPath,
String sha)
Get a list of Merge Requests related to the specified commit.
|
Pager<MergeRequest> |
getMergeRequests(Object projectIdOrPath,
String sha,
int itemsPerPage)
Get a Pager of Merge Requests related to the specified commit.
|
Stream<MergeRequest> |
getMergeRequestsStream(Object projectIdOrPath,
String sha)
Get a Stream of Merge Requests related to the specified commit.
|
Optional<Commit> |
getOptionalCommit(Object projectIdOrPath,
String sha)
Get a specific commit identified by the commit hash or name of a branch or tag as an Optional instance
|
Optional<GpgSignature> |
getOptionalGpgSignature(Object projectIdOrPath,
String sha)
Get the GPG signature from a commit as an Optional instance
|
Commit |
revertCommit(Object projectIdOrPath,
String sha,
String branch)
Reverts a commit in a given branch.
|
addFormParam, addFormParam, delete, delete, get, get, getApiClient, getApiVersion, getDefaultPerPage, getDefaultPerPageParam, getDefaultPerPageParam, getGroupIdOrPath, getLabelIdOrName, getPageQueryParams, getPageQueryParams, getPerPageQueryParam, getProjectIdOrPath, getUserIdOrUsername, getWithAccepts, handle, head, isApiVersion, post, post, post, post, post, put, put, put, putUpload, putUpload, putWithFormData, upload, upload, upload, urlEncode, validate
public CommitsApi(GitLabApi gitLabApi)
public List<Commit> getCommits(Object projectIdOrPath) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/repository/commits
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instanceGitLabApiException
- GitLabApiException if any exception occurs during execution@Deprecated public List<Commit> getCommits(Object projectIdOrPath, int page, int perPage) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/repository/commits
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancepage
- the page to getperPage
- the number of commits per pageGitLabApiException
- GitLabApiException if any exception occurs during executionpublic Pager<Commit> getCommits(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/repository/commits
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instanceitemsPerPage
- the number of Commit instances that will be fetched per pageGitLabApiException
- GitLabApiException if any exception occurs during executionpublic Stream<Commit> getCommitStream(Object projectIdOrPath) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/repository/commits
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instanceGitLabApiException
- GitLabApiException if any exception occurs during executionpublic List<Commit> getCommits(Object projectIdOrPath, String ref, Date since, Date until, String path) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/repository/commits
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instanceref
- 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 returnedpath
- the path to file of a projectGitLabApiException
- GitLabApiException if any exception occurs during executionpublic List<Commit> getCommits(Object projectIdOrPath, String ref, String path) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/repository/commits?path=:file_path
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instanceref
- the name of a repository branch or tag or if not given the default branchpath
- the path to file of a projectGitLabApiException
- GitLabApiException if any exception occurs during executionpublic List<Commit> getCommits(Object projectIdOrPath, String ref, Date since, Date until) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/repository/commits
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instanceref
- 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 execution@Deprecated public List<Commit> getCommits(Object projectIdOrPath, String ref, Date since, Date until, int page, int perPage) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/repository/commits
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instanceref
- 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 Stream<Commit> getCommitsStream(Object projectIdOrPath, String ref, Date since, Date until) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/repository/commits
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instanceref
- 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 Stream<Commit> getCommitsStream(Object projectIdOrPath, String ref, Date since, Date until, String path) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/repository/commits
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instanceref
- 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 returnedpath
- the path to file of a projectGitLabApiException
- GitLabApiException if any exception occurs during execution@Deprecated public List<Commit> getCommits(Object projectIdOrPath, String ref, Date since, Date until, String path, int page, int perPage) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/repository/commits
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instanceref
- 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 returnedpath
- the path to file of a projectpage
- the page to getperPage
- the number of commits per pageGitLabApiException
- GitLabApiException if any exception occurs during executionpublic Pager<Commit> getCommits(Object projectIdOrPath, String ref, Date since, Date until, int itemsPerPage) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/repository/commits
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instanceref
- 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 Pager<Commit> getCommits(Object projectIdOrPath, String ref, Date since, Date until, String path, int itemsPerPage) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/repository/commits
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instanceref
- 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 pagepath
- the path to file of a projectGitLabApiException
- GitLabApiException if any exception occurs during executionpublic List<Commit> getCommits(Object projectIdOrPath, String ref, Date since, Date until, String path, Boolean all, Boolean withStats, Boolean firstParent) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/repository/commits
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instanceref
- 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 returnedpath
- the path to file of a projectall
- retrieve every commit from the repositorywithStats
- stats about each commit will be added to the responsefirstParent
- follow only the first parent commit upon seeing a merge commitGitLabApiException
- GitLabApiException if any exception occurs during executionpublic Pager<Commit> getCommits(Object projectIdOrPath, String ref, Date since, Date until, String path, Boolean all, Boolean withStats, Boolean firstParent, int itemsPerPage) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/repository/commits
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instanceref
- 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 returnedpath
- the path to file of a projectall
- retrieve every commit from the repositorywithStats
- stats about each commit will be added to the responsefirstParent
- follow only the first parent commit upon seeing a merge commititemsPerPage
- the number of Commit instances that will be fetched per pageGitLabApiException
- GitLabApiException if any exception occurs during executionpublic Stream<Commit> getCommitsStream(Object projectIdOrPath, String ref, Date since, Date until, String path, Boolean all, Boolean withStats, Boolean firstParent) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/repository/commits
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instanceref
- 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 returnedpath
- the path to file of a projectall
- retrieve every commit from the repositorywithStats
- stats about each commit will be added to the responsefirstParent
- follow only the first parent commit upon seeing a merge commitGitLabApiException
- GitLabApiException if any exception occurs during executionpublic Commit getCommit(Object projectIdOrPath, String sha) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/repository/commits/:sha
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancesha
- a commit hash or name of a branch or tagGitLabApiException
- GitLabApiException if any exception occurs during executionpublic Optional<Commit> getOptionalCommit(Object projectIdOrPath, String sha)
GitLab Endpoint: GET /projects/:id/repository/commits/:sha
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancesha
- a commit hash or name of a branch or tagpublic List<CommitRef> getCommitRefs(Object projectIdOrPath, String sha) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/repository/commits/:sha/refs
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancesha
- a commit hash or name of a branch or tagGitLabApiException
- GitLabApiException if any exception occurs during executionpublic Pager<CommitRef> getCommitRefs(Object projectIdOrPath, String sha, int itemsPerPage) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/repository/commits/:sha/refs?type=:refType
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancesha
- a commit hash or name of a branch or tagitemsPerPage
- the number of Commit instances that will be fetched per pageGitLabApiException
- GitLabApiException if any exception occurs during executionpublic Stream<CommitRef> getCommitRefsStream(Object projectIdOrPath, String sha) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/repository/commits/:sha/refs
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancesha
- a commit hash or name of a branch or tagGitLabApiException
- GitLabApiException if any exception occurs during executionpublic List<CommitRef> getCommitRefs(Object projectIdOrPath, String sha, CommitRef.RefType refType) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/repository/commits/:sha/refs?type=:refType
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancesha
- a commit hash or name of a branch or tagrefType
- the scope of commits. Possible values branch, tag, all. Default is all.GitLabApiException
- GitLabApiException if any exception occurs during executionpublic Pager<CommitRef> getCommitRefs(Object projectIdOrPath, String sha, CommitRef.RefType refType, int itemsPerPage) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/repository/commits/:sha/refs?type=:refType
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancesha
- a commit hash or name of a branch or tagrefType
- the scope of commits. Possible values branch, tag, all. Default is all.itemsPerPage
- the number of Commit instances that will be fetched per pageGitLabApiException
- GitLabApiException if any exception occurs during executionpublic Stream<CommitRef> getCommitRefsStream(Object projectIdOrPath, String sha, CommitRef.RefType refType) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/repository/commits/:sha/refs?type=:refType
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancesha
- a commit hash or name of a branch or tagrefType
- the scope of commits. Possible values branch, tag, all. Default is all.GitLabApiException
- GitLabApiException if any exception occurs during executionpublic List<CommitStatus> getCommitStatuses(Object projectIdOrPath, String sha, CommitStatusFilter filter) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/repository/commits/:sha/statuses
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancesha
- the commit SHAfilter
- the commit statuses file, contains ref, stage, name, allGitLabApiException
- GitLabApiException if any exception occurs during executionpublic List<CommitStatus> getCommitStatuses(Object projectIdOrPath, String sha, CommitStatusFilter filter, int page, int perPage) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/repository/commits/:sha/statuses
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancesha
- the commit SHAfilter
- the commit statuses file, contains ref, stage, name, allpage
- the page to getperPage
- the number of commits statuses per pageGitLabApiException
- GitLabApiException if any exception occurs during executionpublic Pager<CommitStatus> getCommitStatuses(Object projectIdOrPath, String sha, CommitStatusFilter filter, int itemsPerPage) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/repository/commits/:sha/statuses
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancesha
- the commit SHAfilter
- the commit statuses file, contains ref, stage, name, allitemsPerPage
- the number of CommitStatus instances that will be fetched per pageGitLabApiException
- GitLabApiException if any exception occurs during executionpublic Stream<CommitStatus> getCommitStatusesStream(Object projectIdOrPath, String sha, CommitStatusFilter filter) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/repository/commits/:sha/statuses
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancesha
- the commit SHAfilter
- the commit statuses file, contains ref, stage, name, allGitLabApiException
- GitLabApiException if any exception occurs during executionpublic CommitStatus addCommitStatus(Object projectIdOrPath, String sha, Constants.CommitBuildState state, CommitStatus status) throws GitLabApiException
Add or update the build status of a commit. The following fluent methods are available on the CommitStatus instance for setting up the status:
withCoverage(Float)
withDescription(String)
withName(String)
withRef(String)
withTargetUrl(String)
GitLab Endpoint: POST /projects/:id/statuses/:sha
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instance (required)sha
- a commit SHA (required)state
- the state of the status. Can be one of the following: PENDING, RUNNING, SUCCESS, FAILED, CANCELED (required)status
- the CommitSatus instance hoilding the optional parms: ref, name, target_url, description, and coverageGitLabApiException
- GitLabApiException if any exception occurs during executionpublic List<Diff> getDiff(Object projectIdOrPath, String sha) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/repository/commits/:sha/diff
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancesha
- a commit hash or name of a branch or tagGitLabApiException
- GitLabApiException if any exception occurs during executionpublic Pager<Diff> getDiff(Object projectIdOrPath, String sha, int itemsPerPage) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/repository/commits/:sha/diff
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancesha
- a commit hash or name of a branch or tagitemsPerPage
- the number of Diff instances that will be fetched per pageGitLabApiException
- GitLabApiException if any exception occurs during executionpublic Stream<Diff> getDiffStream(Object projectIdOrPath, String sha) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/repository/commits/:sha/diff
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancesha
- a commit hash or name of a branch or tagGitLabApiException
- GitLabApiException if any exception occurs during executionpublic List<Comment> getComments(Object projectIdOrPath, String sha) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/repository/commits/:sha/comments
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancesha
- a commit hash or name of a branch or tagGitLabApiException
- GitLabApiException if any exception occurs during executionpublic Pager<Comment> getComments(Object projectIdOrPath, String sha, int itemsPerPage) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/repository/commits/:sha/comments
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancesha
- a commit hash or name of a branch or tagitemsPerPage
- the number of Comment instances that will be fetched per pageGitLabApiException
- GitLabApiException if any exception occurs during executionpublic Stream<Comment> getCommentsStream(Object projectIdOrPath, String sha) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/repository/commits/:sha/comments
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancesha
- a commit hash or name of a branch or tagGitLabApiException
- GitLabApiException if any exception occurs during executionpublic Comment addComment(Object projectIdOrPath, String sha, String note, String path, Integer line, Constants.LineType lineType) throws GitLabApiException
GitLab Endpoint: POST /projects/:id/repository/commits/:sha/comments
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancesha
- a commit hash or name of a branch or tagnote
- the text of the comment, requiredpath
- the file path relative to the repository, optionalline
- the line number where the comment should be placed, optionallineType
- the line type, optionalGitLabApiException
- GitLabApiException if any exception occurs during executionpublic Comment addComment(Object projectIdOrPath, String sha, String note) throws GitLabApiException
GitLab Endpoint: POST /projects/:id/repository/commits/:sha/comments
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancesha
- a commit hash or name of a branch or tagnote
- the text of the comment, requiredGitLabApiException
- GitLabApiException if any exception occurs during executionpublic Commit createCommit(Object projectIdOrPath, String branch, String commitMessage, String startBranch, String authorEmail, String authorName, CommitAction action) throws GitLabApiException
GitLab Endpoint: POST /projects/:id/repository/commits
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancebranch
- tame of the branch to commit into. To create a new branch, also provide startBranchcommitMessage
- the commit messagestartBranch
- the name of the branch to start the new commit fromauthorEmail
- the commit author's email addressauthorName
- the commit author's nameaction
- the CommitAction to commitGitLabApiException
- if any exception occurs during executionpublic Commit createCommit(Object projectIdOrPath, String branch, String commitMessage, String startBranch, String authorEmail, String authorName, List<CommitAction> actions) throws GitLabApiException
GitLab Endpoint: POST /projects/:id/repository/commits
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancebranch
- tame of the branch to commit into. To create a new branch, also provide startBranchcommitMessage
- the commit messagestartBranch
- the name of the branch to start the new commit fromauthorEmail
- the commit author's email addressauthorName
- the commit author's nameactions
- the array of CommitAction to commit as a batchGitLabApiException
- if any exception occurs during executionpublic Commit createCommit(Object projectIdOrPath, CommitPayload payload) throws GitLabApiException
GitLab Endpoint: POST /projects/:id/repository/commits
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancepayload
- a CommitPayload instance holding the parameters for the commitGitLabApiException
- if any exception occurs during executionpublic Commit revertCommit(Object projectIdOrPath, String sha, String branch) throws GitLabApiException
GitLab Endpoint: POST /projects/:id/repository/commits/:sha/revert
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancesha
- the commit SHA to revertbranch
- the target branch to revert the commit onGitLabApiException
- GitLabApiException if any exception occurs during executionpublic Commit cherryPickCommit(Object projectIdOrPath, String sha, String branch) throws GitLabApiException
GitLab Endpoint: POST /projects/:id/repository/commits/:sha/cherry_pick
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancesha
- the commit SHA to cherry pickbranch
- the target branch to cherry pick the commit onGitLabApiException
- GitLabApiException if any exception occurs during executionpublic List<MergeRequest> getMergeRequests(Object projectIdOrPath, String sha) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/repository/commits/:sha/merge_requests
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancesha
- the commit SHA to get merge requests forGitLabApiException
- GitLabApiException if any exception occurs during executionpublic Pager<MergeRequest> getMergeRequests(Object projectIdOrPath, String sha, int itemsPerPage) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/repository/commits/:sha/merge_requests
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancesha
- the commit SHA to get merge requests foritemsPerPage
- the number of Commit instances that will be fetched per pageGitLabApiException
- GitLabApiException if any exception occurs during executionpublic Stream<MergeRequest> getMergeRequestsStream(Object projectIdOrPath, String sha) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/repository/commits/:sha/merge_requests
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancesha
- the commit SHA to get merge requests forGitLabApiException
- GitLabApiException if any exception occurs during executionpublic GpgSignature getGpgSignature(Object projectIdOrPath, String sha) throws GitLabApiException
GitLab Endpoint: GET /projects/:id/repository/commits/:sha/signature
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancesha
- a commit hash or name of a branch or tagGitLabApiException
- GitLabApiException if any exception occurs during executionpublic Optional<GpgSignature> getOptionalGpgSignature(Object projectIdOrPath, String sha)
GitLab Endpoint: GET /projects/:id/repository/commits/:sha/signature
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancesha
- a commit hash or name of a branch or tagCopyright © 2020. All rights reserved.