Unverified Commit 37503e0c authored by Jérémie Bresson's avatar Jérémie Bresson Committed by GitHub
Browse files

Use POST instead of PUT for cancelMergeRequest(..) (#948)

Fixes #931
parent f8e26d50
No related merge requests found
Showing with 2 additions and 2 deletions
+2 -2
......@@ -804,7 +804,7 @@ public class MergeRequestApi extends AbstractApi {
*
* <p>NOTE: GitLab API V4 uses IID (internal ID), V3 uses ID to identify the merge request.</p>
*
* <pre><code>GitLab Endpoint: PUT /projects/:id/merge_requests/:merge_request_iid/cancel_merge_when_pipeline_succeeds</code></pre>
* <pre><code>GitLab Endpoint: POST /projects/:id/merge_requests/:merge_request_iid/cancel_merge_when_pipeline_succeeds</code></pre>
*
* @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
* @param mergeRequestIid the internal ID of the merge request
......@@ -817,7 +817,7 @@ public class MergeRequestApi extends AbstractApi {
throw new RuntimeException("mergeRequestIid cannot be null");
}
Response response = put(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "cancel_merge_when_pipeline_succeeds");
Response response = post(Response.Status.OK, (Form)null, "projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "cancel_merge_when_pipeline_succeeds");
return (response.readEntity(MergeRequest.class));
}
......
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