GitLab

  • Updated

Integrate GitLab commits, branches, and merge requests with ClickUp tasks. This allows users to: 

  1. See all GitLab activity related to a task directly in ClickUp. 

  2. Optionally receive ClickUp notifications when new GitLab activity items are added to tasks.

  3. Automatically (or manually) attach GitLab activity to ClickUp tasks

  4. Automatically change Statuses with GitLab actions by adding the ClickUp task id to your commits using this format #{taskID}[status] For example: #1abc2de[closed]

Screenshot showing a GitLab activity notification.

How to Enable GitLab in ClickUp 

Step 1 (option 1): Authorize GitLab.com 

Note: Only admins can attach repositories to your Workspace's Spaces

Click Add GitLab  to authorize ClickUp.

Screenshot of the 'add Gitlab' button in ClickUp.

Note: You must Authorize to associate GitLab activity with ClickUp tasks:

Screenshot of the 'authorize ClickUp' popup in Gitlab.

Step 1 (option 2): Authorize self-hosted GitLab

Note: For security purposes, we require all GitLab integrations that use a Self-Hosted GitLab instance to have a Top Level Domain (TLD). We do not allow IP addresses or domains that are not recognized as a Top Level Domain.

1. In your hosted GitLab, go to Settings  in the top right dropdown menu

Screenshot highlighting the settings menu in GitLab.

2. Go to Access tokens  in the left sidebar

3. Create a new access token with the api  and read_user scopes. Set an expiration date.

Screenshot of the 'add a personal access token' menu in GitLab.

4. Copy the personal access token given into ClickUp along with your GitLab url (ex: https://gitlab.mydomain.com/ ).

Screenshot showing an example of a personal access token in GitLab.
Image of the screen in ClickUp users paste their GitLab access token.

Step 2: Attach Personal Repositories to ClickUp 

ClickUp allows multiple people to authorize GitLab within your Workspace, and also permits you to customize which repositories are shared with your Workspace. 

This means that you can authorize your personal account without attaching all of your repositories; you can customize which ones to attach. 

Attaching a repository does not give users access to your repository's codebase in any way. It simply allows users to attach history items for that repository to the Space(s) you specify. 

Screenshot highlighting the menu to add a GitLab repository to ClickUp.

Step 3: Select which Spaces are attached to your Repositories 

You can customize which Spaces repositories are attached to by expanding the drop-down on the right side of the page. Select one or more Spaces to attach repositories to. 

In order to attach GitLab items to tasks, the Space must be attached to the repository.

Screenshot showing the GitLab integrations menu in ClickUp, highlighting the 'GitLab repositories added to ClickUp menu.

Automatically associate GitLab activity in ClickUp 

ClickUp will automatically pick up any new activity and associate it with tasks.

To enable this, you must: 

Add a ClickUp task ID in any part of the merge request title, branch name, or commit message in one of these formats:

#{task_id}

CU-{task_id}

{custom_task_id}

For example:

#1abc2de

CU-1abc2de

prefix-1

Manually associating GitLab Commits

Screenshot showing the GitLab icon in a ClickUp task.
  1. Click the GitLab icon on any task

  2. Click on the "Commit" tab

  3. Select a Repo

  4. Select a Branch

  5. Attach your commit

Screenshot showing the 'GitLab Commits' menu where users can attach commits in ClickUp.png

Manually associating GitLab branches

  1. Click the GitLab icon on any task

  2. Click on the "Branch" tab

  3. Select a Repo

  4. Attach your branch

Screenshot showing the 'GitLab Commits' menu where users can attach a branch.

Automatically change task Status via GitLab 

You can also change the status of a task from a commit, issue, or merge request .

To do this:

Add the ClickUp task ID in any part of the commit message with the status you want inside square brackets.

For example: #u7hu[staged]

Watch the task's status change in this video.

Gif showing a ClickUp task status change via GitLab.

Actions

Quickly and easily create new branches from within ClickUp with our quick actions.

  1. Click on the GitLab icon to open the Git modal

  2. On the left are a variety of auto-generated quick copy options like suggested name, command to checkout and link a new branch locally, command to link a single commit, or a command to open a merge request

Screenshot showing the GitLab modal where users can create or merge branches.

Customize the auto-generated name used in these options under the GitLab integration settings!

Screenshot showing the Gitlab integrations settings where users can customize the auto-generated branch name formats.

If you prefer to create a new branch directly in GitLab, click the "New Branch" button in the GitLab modal.

Merge requests

Create merge requests from within ClickUp or link existing ones! To create a new merge request in ClickUp:

  1. Click the GitLab icon on the task you'd like to link

  2. Click the "New Merge Request" button

  3. In the modal, a suggested merge request title will be pre-filled with a suggested title. If you don't like the auto-generated title, adjust it in the GitLab integration settings.

  4. Select a target and source branch

  5. Enter a description

  6. Create the merge request

As soon as you create a merge request in ClickUp or link an existing one, a link to the associated ClickUp task will be added to the merge request!

Screenshot showing details of a ClickUp merge request.

Once a merge request is linked, you can see who opened it, the reviewer (if one is assigned), CI/CD status, and merge request status (open, review requested, under review, merged, closed) all from within the linked ClickUp task!

Remove the GitLab integration

Only Workspace owners and admins can remove the GitLab integration.

To remove the GitLab integration:

  1. In the lower-left corner, click your avatar.
  2. Select Integrations.
  3. Select GitLab.
  4. In the lower-right corner, click Remove Gitlab.

Having trouble with GitLab?

Read our troubleshooting article or ask GitLab customer support here.

Was this article helpful?