
GitLab Create
CertifiedOpen a project merge request
GitLab Create
Open a project merge request
Creates a merge request through the GitLab REST API for the target project. Requires projectId, token, sourceBranch, targetBranch, and title; description is optional. Supports custom url and apiPath for self-hosted GitLab and renders templated values before sending.
type: io.kestra.plugin.gitlab.mergerequests.CreateExamples
Create a merge request in a GitLab project using an access token.
id: gitlab_merge_request
namespace: company.team
tasks:
- id: create_merge_request
type: io.kestra.plugin.gitlab.mergerequests.Create
token: "{{ secret('GITLAB_TOKEN') }}"
projectId: "123"
title: "Feature: Add new functionality"
mergeRequestDescription: "This merge request adds new functionality to the project"
sourceBranch: "feat-testing"
targetBranch: "main"
Create a merge request with custom API path for self-hosted GitLab.
id: gitlab_merge_request_self_hosted
namespace: company.team
tasks:
- id: create_merge_request
type: io.kestra.plugin.gitlab.mergerequests.Create
url: https://gitlab.example.com
apiPath: /api/v4/projects
token: "{{ secret('GITLAB_TOKEN') }}"
projectId: "123"
title: "Hotfix: Critical bug fix"
sourceBranch: "hotfix-branch"
targetBranch: "main"
Properties
projectId *Requiredstring
Project ID or path
Numeric project ID or URL-encoded project path rendered from the context to build API endpoints.
sourceBranch *Requiredstring
Source branch
Branch name to merge from (required).
targetBranch *Requiredstring
Target branch
Branch name to merge into (required).
title *Requiredstring
Merge request title
Title shown on the merge request (required).
token *Requiredstring
Access token used for API calls
GitLab Personal/Project/Group Access Token sent as the PRIVATE-TOKEN header; requires scopes that cover the requested API operations. See the GitLab Authentication docs.
apiPath string
/api/v4/projectsProjects API path
Projects API prefix appended before the project ID; defaults to /api/v4/projects. Override when fronting GitLab with a proxy or custom base path.
mergeRequestDescription string
Merge request description
Optional Markdown or text body for the merge request.
pluginDefaultsRef Non-dynamicstring
Reference (ref) of the pluginDefaults to apply to this task.
url string
https://gitlab.comGitLab API base URL
Base URL of the GitLab instance; defaults to https://gitlab.com. Override for self-hosted installations.
Outputs
mergeReqID string
Merge Request ID
statusCode integer
HTTP status code
HTTP response code from the GitLab API.
webUrl string
Merge Request URL
Web URL of the created merge request.