GitLab Create

GitLab Create

Certified

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.

yaml
type: io.kestra.plugin.gitlab.mergerequests.Create

Create a merge request in a GitLab project using an access token.

yaml
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.

yaml
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

Project ID or path

Numeric project ID or URL-encoded project path rendered from the context to build API endpoints.

Source branch

Branch name to merge from (required).

Target branch

Branch name to merge into (required).

Merge request title

Title shown on the merge request (required).

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.

Default/api/v4/projects

Projects 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.

Merge request description

Optional Markdown or text body for the merge request.

Reference (ref) of the pluginDefaults to apply to this task.

Defaulthttps://gitlab.com

GitLab API base URL

Base URL of the GitLab instance; defaults to https://gitlab.com. Override for self-hosted installations.

Merge Request ID

HTTP status code

HTTP response code from the GitLab API.

Merge Request URL

Web URL of the created merge request.