GitLab API icon

GitLab API

Gitlab

Actions1062

Merge_requests → postApiV4ProjectsIdMergeRequestsMergeRequestIidCancelMergeWhenPipelineSucceeds

AI-generated

Summary

Cancel the automatic merge of a merge request once its pipeline succeeds in a GitLab project.

Inputs

  • id (required) — The ID or URL-encoded path of the GitLab project containing the merge request.
  • merge_request_iid (required) — The internal ID of the merge request for which to cancel the 'merge when pipeline succeeds' action.

Output shape

a single JSON object representing the updated merge request status after cancelling the automatic merge.

The operation performs a POST request with no request body. Requires authentication via the configured GitLab API credential unless 'Skip Authentication' is set to true.

Examples

Example 1: Cancel an automatic merge scheduled for a merge request in project 'my-group/my-project' with merge_request_iid 42

Set 'id' to 'my-group%2Fmy-project' and 'merge_request_iid' to 42 in path parameters, and execute the operation.

Links

Discussion