Use GitLab actions with automation

You can use automation actions to connect your Jira Service Management projects with GitLab, letting you automate common development workflows directly from your automation rules. These actions let you create branches, approve merge requests, and retrieve information about branches and repositories — without leaving Jira.

Before you begin: To use GitLab actions in your automation rules, you need to connect your GitLab account to your Jira site. Learn more about integrating with GitLab.

Available GitLab actions

The following automation actions are available for GitLab. You can add these actions to any automation rule in your project.


Create branch

Use this action to create a new GitLab branch from an existing source branch. This is useful when you want to automatically create a feature or fix branch when an issue is created or transitions to a development status.

Fields:

Field

Description

Required

branchName

The name of the branch to create. You can use smart values to dynamically generate the name — for example, {{issue.key}}-{{issue.summary}}.

Yes

sourceBranch

The parent branch to create the new branch from (for example, main).

Yes

workspace

The GitLab project (workspace) to create the branch in.

Yes

Tip: Use smart values like {{issue.key}} in the branch name to automatically link the branch back to the issue. This makes it easier to track development work from your project board.


Get branches

Use this action to retrieve the list of branches for a specific GitLab repository. You can use the results in later steps or conditions in your rule — for example, to check whether a branch already exists before creating one.

Fields:

Field

Description

Required

repositoryId

The ID of the GitLab repository (project) to find branches for.

Yes


Approve merge request

Use this action to programmatically approve a GitLab merge request when it meets your Jira-based approval or review criteria. This is useful for automating code review gates — for example, automatically approving a merge request when a linked issue moves to an approved status.

Fields:

Field

Description

Required

workspace

The ID of the GitLab project.

Yes

pullRequestId

The ID of the merge request to approve.

Yes

Note: The authenticated GitLab user must have sufficient permissions to approve merge requests in the target project. If the user doesn't have the required role, the action will fail.


Get merge requests for authenticated user

Use this action to retrieve merge requests that are relevant to the authenticated GitLab user, such as those they authored or that are assigned to them. This is useful for building rules that check the status of in-progress work.

Fields:

Field

Description

Required

state

The state of merge requests to return (for example, opened, closed, merged). If not specified, all states are returned.

No

Tip: You can configure this action to return merge requests authored by or assigned to the authenticated user. Use the results in a condition or follow-up action to build more targeted rules.


Get repositories

Use this action to list GitLab projects that the authenticated user can access, optionally filtered by minimum access level. This is useful when you need to dynamically select a repository in a later automation step.

Fields:

Field

Description

Required

minAccessLevel

The minimum user access level for the target repositories. Accepted values: No access (0), Minimal access (5), Guest (10), Planner (15), Reporter (20), Developer (30), Maintainer (40), Owner (50), Admin (60).

No

Tip: Results vary by the authenticated user's visibility and membership. Only repositories the user has access to will be returned.


Example: Automatically create a branch when an issue moves to "In progress"

Here's how you might use the Create branch action in a real automation rule:

  1. Trigger: Issue transitioned → Status changed to In progress

  2. Action: GitLab — Create branch

    • branchName: {{issue.key}}-{{issue.summary | slugify}}

    • sourceBranch: main

    • workspace: Your GitLab project ID

  3. Result: A new branch like JSM-123-fix-login-error is created in your GitLab repository, automatically linked to the issue.

Still need help?

The Atlassian Community is here for you.