Skip to content
Author with AI

<GitLabMergeRequest>

The <GitLabMergeRequest> block creates a GitLab merge request from changes made during a runbook. It is a GitLab-locked alias of <GitPullRequest> — equivalent to <GitPullRequest provider="gitlab" /> — and accepts the same props, including prefilledCommitMessage.

<GitLabAuth
id="gl-auth"
title="Connect to GitLab"
/>
<GitClone
id="clone-repo"
gitAuthId="gl-auth"
title="Clone Repository"
prefilledUrl="https://gitlab.com/acme-corp/infrastructure"
/>
<GitLabMergeRequest
id="create-mr"
gitAuthId="gl-auth"
title="Create Merge Request"
prefilledBranchName="upgrade-pipelines-v4"
prefilledCommitMessage="Upgrade Gruntwork Pipelines from v3 to v4 [skip ci]"
prefilledPullRequestTitle="[skip ci] Upgrade Gruntwork Pipelines from v3 to v4"
prefilledPullRequestDescription="Upgrades Pipelines configuration from v3 to v4."
/>

You can pre-populate the MR title, description, labels, branch name, and commit message. Users can still edit these values before creating the MR.

PropTypeRequiredDescription
idstringYesUnique block identifier.
titlestringNoDisplay title. Defaults to Create Merge Request.
descriptionstringNoDescription text below the title.
gitAuthIdstringNoReference to a <GitAuth> or <GitLabAuth> block.
prefilledPullRequestTitlestringNoPre-fills the MR title field. Supports template expressions.
prefilledPullRequestDescriptionstringNoPre-fills the MR description field. Supports template expressions.
prefilledPullRequestLabelsstring[]NoPre-selects labels by name.
prefilledBranchNamestringNoPre-fills the branch name. Supports template expressions.
prefilledCommitMessagestringNoPre-fills the commit message used when committing changes before opening the MR. Supports template expressions.