GitLab API

GitlabTool

Actions1095

Merge_requests → postApiV4ProjectsIdMergeRequests

AI-generated

Summary

Create a new merge request for a specified project on GitLab by providing the project ID and the merge request details in the request body.

Inputs

  • id (required) — The ID or URL-encoded path of the GitLab project to create the merge request for.
  • postApiV4ProjectsIdMergeRequests (required) — An object containing the properties for the new merge request to be created, conforming to the postApiV4ProjectsIdMergeRequests schema.

Output shape

a single JSON object representing the newly created merge request as returned by the GitLab API

Requires authentication via the GitLab API credentials unless 'Skip Authentication' is enabled. The HTTP method used for the API call is POST to the path /api/v4/projects/{id}/merge_requests.

Examples

Example 1: Create a new merge request for project with ID 123

Set 'id' path parameter to '123' and provide 'postApiV4ProjectsIdMergeRequests' body with required fields such as source branch, target branch, and title.

Links

Discussion