GitLab API

GitlabTool

Actions1095

Merge_requests → putApiV4ProjectsIdMergeRequestsMergeRequestIidMerge

AI-generated

Summary

Merge the specified merge request of a project in GitLab by sending a PUT request to the merge 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 (IID) of the merge request to merge.
  • putApiV4ProjectsIdMergeRequestsMergeRequestIidMerge (required) — The request body object containing parameters for merging the merge request (such as merge commit message and options).
  • skipAuthentication — Whether to skip authentication (default: false).
  • baseUrl — The base URL of the GitLab instance, defaulting to https://gitlab.com.

Output shape

a single JSON object representing the updated merge request after the merge operation

The response contains the merge request details returned by the GitLab API after attempting the merge. Authentication is required unless skipped explicitly. The operation performs a PUT HTTP method to the /api/v4/projects/{id}/merge_requests/{merge_request_iid}/merge endpoint.

Examples

Example 1: Merging a merge request

Provide the project ID, the merge request IID, and the required merge parameters in the request body to execute the merge.

Links

Discussion