Unverified Commit 608c4861 authored by Vimsucks's avatar Vimsucks Committed by GitHub
Browse files

Add allowMergeOnSkippedPipeline to Project (#846)

parent 3db0a87c
......@@ -331,7 +331,7 @@ public class MergeRequestApi extends AbstractApi {
* @return a list containing the commits for the specified merge request
* @throws GitLabApiException GitLabApiException if any exception occurs during execution
*/
public List<Commit> getCommits(Object projectIdOrPath, int mergeRequestIid) throws GitLabApiException {
public List<Commit> getCommits(Object projectIdOrPath, Long mergeRequestIid) throws GitLabApiException {
return (getCommits(projectIdOrPath, mergeRequestIid, getDefaultPerPage()).all());
}
......@@ -349,7 +349,7 @@ public class MergeRequestApi extends AbstractApi {
* @return a list containing the commits for the specified merge request
* @throws GitLabApiException GitLabApiException if any exception occurs during execution
*/
public List<Commit> getCommits(Object projectIdOrPath, int mergeRequestIid, int page, int perPage) throws GitLabApiException {
public List<Commit> getCommits(Object projectIdOrPath, Long mergeRequestIid, int page, int perPage) throws GitLabApiException {
Form formData = new GitLabApiForm().withParam("owned", true).withParam(PAGE_PARAM, page).withParam(PER_PAGE_PARAM, perPage);
Response response = get(Response.Status.OK, formData.asMap(), "projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "commits");
return (response.readEntity(new GenericType<List<Commit>>() {}));
......@@ -368,7 +368,7 @@ public class MergeRequestApi extends AbstractApi {
* @return a Pager containing the commits for the specified merge request
* @throws GitLabApiException GitLabApiException if any exception occurs during execution
*/
public Pager<Commit> getCommits(Object projectIdOrPath, int mergeRequestIid, int itemsPerPage) throws GitLabApiException {
public Pager<Commit> getCommits(Object projectIdOrPath, Long mergeRequestIid, int itemsPerPage) throws GitLabApiException {
return (new Pager<Commit>(this, Commit.class, itemsPerPage, null,
"projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "commits"));
}
......@@ -385,7 +385,7 @@ public class MergeRequestApi extends AbstractApi {
* @return a Stream containing the commits for the specified merge request
* @throws GitLabApiException GitLabApiException if any exception occurs during execution
*/
public Stream<Commit> getCommitsStream(Object projectIdOrPath, int mergeRequestIid) throws GitLabApiException {
public Stream<Commit> getCommitsStream(Object projectIdOrPath, Long mergeRequestIid) throws GitLabApiException {
return (getCommits(projectIdOrPath, mergeRequestIid, getDefaultPerPage()).stream());
}
......
......@@ -19,6 +19,7 @@ public class MergeRequest {
private Author author;
private Boolean blockingDiscussionsResolved;
private List<Diff> changes;
private String changesCount;
private Date closedAt;
private Participant closedBy;
private Date createdAt;
......@@ -136,6 +137,14 @@ public class MergeRequest {
this.changes = changes;
}
public String getChangesCount() {
return changesCount;
}
public void setChangesCount(String changesCount) {
this.changesCount = changesCount;
}
public Date getClosedAt() {
return closedAt;
}
......
......@@ -64,6 +64,7 @@ public class Project {
private Namespace namespace;
private String nameWithNamespace;
private Boolean onlyAllowMergeIfPipelineSucceeds;
private Boolean allowMergeOnSkippedPipeline;
private Boolean onlyAllowMergeIfAllDiscussionsAreResolved;
private Integer openIssuesCount;
private Owner owner;
......@@ -360,6 +361,19 @@ public class Project {
return (this);
}
public Boolean getAllowMergeOnSkippedPipeline() {
return allowMergeOnSkippedPipeline;
}
public void setAllowMergeOnSkippedPipeline(Boolean allowMergeOnSkippedPipeline) {
this.allowMergeOnSkippedPipeline = allowMergeOnSkippedPipeline;
}
public Project withAllowMergeOnSkippedPipeline(Boolean allowMergeOnSkippedPipeline) {
this.allowMergeOnSkippedPipeline = allowMergeOnSkippedPipeline;
return (this);
}
public Boolean getOnlyAllowMergeIfAllDiscussionsAreResolved() {
return onlyAllowMergeIfAllDiscussionsAreResolved;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment