An error occurred while loading the file. Please try again.
An error occurred while loading the file. Please try again.
An error occurred while loading the file. Please try again.
-
Greg Messner authored9996ee4b
package org.gitlab4j.api;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.Optional;
import java.util.stream.Stream;
import javax.ws.rs.core.Form;
import javax.ws.rs.core.GenericType;
import javax.ws.rs.core.MultivaluedMap;
import javax.ws.rs.core.Response;
import org.gitlab4j.api.models.Comment;
import org.gitlab4j.api.models.Commit;
import org.gitlab4j.api.models.CommitAction;
import org.gitlab4j.api.models.CommitAction.Action;
import org.gitlab4j.api.models.CommitPayload;
import org.gitlab4j.api.models.CommitRef;
import org.gitlab4j.api.models.CommitRef.RefType;
import org.gitlab4j.api.models.CommitStatus;
import org.gitlab4j.api.models.CommitStatusFilter;
import org.gitlab4j.api.models.Diff;
import org.gitlab4j.api.models.GpgSignature;
import org.gitlab4j.api.models.MergeRequest;
import org.gitlab4j.api.utils.ISO8601;
/**
* This class implements the client side API for the GitLab commits calls.
* See <a href="https://docs.gitlab.com/ce/api/commits.html">Commits API at GitLab</a> for more information.
*/
public class CommitsApi extends AbstractApi {
public CommitsApi(GitLabApi gitLabApi) {
super(gitLabApi);
}
/**
* Get a list of all repository commits in a project.
*
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits</code></pre>
*
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
* @return a list containing the commits for the specified project ID
* @throws GitLabApiException GitLabApiException if any exception occurs during execution
*/
public List<Commit> getCommits(Object projectIdOrPath) throws GitLabApiException {
return (getCommits(projectIdOrPath, null, null, null, null, true, null, null, getDefaultPerPage()).all());
}
/**
* Get a list of repository commits in a project.
*
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits</code></pre>
*
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
* @param page the page to get
* @param perPage the number of commits per page
* @return a list containing the commits for the specified project ID
* @throws GitLabApiException GitLabApiException if any exception occurs during execution
* @deprecated
*/
@Deprecated
public List<Commit> getCommits(Object projectIdOrPath, int page, int perPage) throws GitLabApiException {
return (getCommits(projectIdOrPath, null, null, null, page, perPage));
}
/**
* Get a Pager of all repository commits in a project.
*