Unverified Commit 1a376848 authored by Gautier de Saint Martin Lacaze's avatar Gautier de Saint Martin Lacaze Committed by GitHub
Browse files

Merge pull request #774 from MDarmawan/master

Update Deployment API 
parents bdc1f6d3 a68e9f0a
...@@ -219,7 +219,7 @@ public class DeploymentsApi extends AbstractApi { ...@@ -219,7 +219,7 @@ public class DeploymentsApi extends AbstractApi {
*/ */
public Pager<MergeRequest> getMergeRequests(Object projectIdOrPath, Integer deploymentId, int itemsPerPage) throws GitLabApiException { public Pager<MergeRequest> getMergeRequests(Object projectIdOrPath, Integer deploymentId, int itemsPerPage) throws GitLabApiException {
return (new Pager<MergeRequest>(this, MergeRequest.class, itemsPerPage, null, return (new Pager<MergeRequest>(this, MergeRequest.class, itemsPerPage, null,
"projects", getProjectIdOrPath(projectIdOrPath), "repository", "commits", deploymentId, "merge_requests")); "projects", getProjectIdOrPath(projectIdOrPath), "deployments", deploymentId, "merge_requests"));
} }
/** /**
......
...@@ -26,12 +26,12 @@ public class DeploymentFilter { ...@@ -26,12 +26,12 @@ public class DeploymentFilter {
/** /**
* Return deployments updated after the specified date. Expected in ISO 8601 format (2019-03-15T08:00:00Z). * Return deployments updated after the specified date. Expected in ISO 8601 format (2019-03-15T08:00:00Z).
*/ */
private Date finishedAfter; private Date updatedAfter;
/** /**
* Return deployments updated before the specified date. Expected in ISO 8601 format (2019-03-15T08:00:00Z). * Return deployments updated before the specified date. Expected in ISO 8601 format (2019-03-15T08:00:00Z).
*/ */
private Date finishedBefore; private Date updatedBefore;
/** /**
* The name of the environment to filter deployments by. * The name of the environment to filter deployments by.
...@@ -59,20 +59,20 @@ public class DeploymentFilter { ...@@ -59,20 +59,20 @@ public class DeploymentFilter {
this.sortOrder = sortOrder; this.sortOrder = sortOrder;
} }
public Date getFinishedAfter() { public Date getUpdatedAfter() {
return finishedAfter; return updatedAfter;
} }
public void setFinishedAfter(Date finishedAfter) { public void setUpdatedAfter(Date updatedAfter) {
this.finishedAfter = finishedAfter; this.updatedAfter = updatedAfter;
} }
public Date getFinishedBefore() { public Date getUpdatedBefore() {
return finishedBefore; return updatedBefore;
} }
public void setFinishedBefore(Date finishedBefore) { public void setUpdatedBefore(Date updatedBefore) {
this.finishedBefore = finishedBefore; this.updatedBefore = updatedBefore;
} }
public String getEnvironment() { public String getEnvironment() {
...@@ -101,13 +101,13 @@ public class DeploymentFilter { ...@@ -101,13 +101,13 @@ public class DeploymentFilter {
return (this); return (this);
} }
public DeploymentFilter withFinishedAfter(Date finishedAfter) { public DeploymentFilter withUpdatedAfter(Date updatedAfter) {
this.finishedAfter = finishedAfter; this.updatedAfter = updatedAfter;
return (this); return (this);
} }
public DeploymentFilter withFinishedBefore(Date finishedBefore) { public DeploymentFilter withUpdatedBefore(Date updatedBefore) {
this.finishedBefore = finishedBefore; this.updatedBefore = updatedBefore;
return (this); return (this);
} }
...@@ -133,8 +133,8 @@ public class DeploymentFilter { ...@@ -133,8 +133,8 @@ public class DeploymentFilter {
return (new GitLabApiForm() return (new GitLabApiForm()
.withParam("order_by", orderBy) .withParam("order_by", orderBy)
.withParam("sort", sortOrder) .withParam("sort", sortOrder)
.withParam("finished_after", ISO8601.toString(finishedAfter, false)) .withParam("updated_after", ISO8601.toString(updatedAfter, false))
.withParam("finished_before", ISO8601.toString(finishedBefore, false)) .withParam("updated_before", ISO8601.toString(updatedBefore, false))
.withParam("environment", environment) .withParam("environment", environment)
.withParam("status", status)); .withParam("status", status));
} }
......
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