GitLab API icon

GitLab API

Gitlab

Actions1062

Merge_requests → putApiV4ProjectsIdMergeRequestsMergeRequestIidMerge

AI-generated

Summary

Send a PUT request to merge a specified merge request in a given GitLab project using the GitLab API v4 endpoint.

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 within the project to be merged.
  • putApiV4ProjectsIdMergeRequestsMergeRequestIidMerge (required) — Request body parameters as defined by the GitLab API schema for merging a merge request, which may include options such as merge commit message, merge method, etc.
  • skipAuthentication — Whether to skip authentication (default: false).
  • baseUrl — Base URL of the GitLab instance; defaults to https://gitlab.com.

Output shape

a single JSON object representing the GitLab API response for the merge action on the specified merge request

The operation returns the HTTP response body from the PUT /api/v4/projects/{id}/merge_requests/{merge_request_iid}/merge endpoint. Authentication is required unless skipAuthentication is set to true. The baseUrl defaults to GitLab's public instance but can be overridden for self-hosted GitLab instances.

Examples

Example 1: Merge a merge request in a project

Provide the project ID or encoded path and the merge request IID, supply necessary merge options in the request body, and execute the operation. The response confirms the merge status and details.

Links

Discussion