diff --git a/src/main/java/org/gitlab4j/api/MergeRequestApi.java b/src/main/java/org/gitlab4j/api/MergeRequestApi.java index fd3a4c68136f804d9ae32754cceba415103d8f9b..18099e45bd10be6e68b5026eafa29700aa0f9b62 100644 --- a/src/main/java/org/gitlab4j/api/MergeRequestApi.java +++ b/src/main/java/org/gitlab4j/api/MergeRequestApi.java @@ -804,7 +804,7 @@ public class MergeRequestApi extends AbstractApi { * *

NOTE: GitLab API V4 uses IID (internal ID), V3 uses ID to identify the merge request.

* - *
GitLab Endpoint: PUT /projects/:id/merge_requests/:merge_request_iid/cancel_merge_when_pipeline_succeeds
+ *
GitLab Endpoint: POST /projects/:id/merge_requests/:merge_request_iid/cancel_merge_when_pipeline_succeeds
* * @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)); }