🦊

GitLab Integration

Link branches, commits, and merge requests to Decuga tasks. The same task transitions and automation triggers as GitHub - connect with GitLab and Decuga sets up the webhooks for you.

Overview

GitLab sends webhook events to Decuga on every push and merge request action. Decuga extracts task codes (e.g. PROJ-42) from branch names, commit messages, and MR titles and links them to the matching task.

GitLab uses a plain Secret Token header (X-Gitlab-Token) rather than an HMAC signature. Choose a long random string as your secret.

Setup (recommended): Connect with GitLab

1

Authorize Decuga

In your Decuga project, open Integrations → Connections and click Connect with GitLab, then approve access on gitlab.com.

Decuga requests GitLab’s apiscope, the only scope that allows managing project webhooks. The token is stored encrypted and only used to list your projects and create or remove this Decuga project’s webhooks. You need Maintainer access on a GitLab project to connect it. One-click setup currently supports gitlab.com; self-hosted GitLab uses the manual setup below.
2

Pick projects

The GitLab card lists every project you maintain. Search, tick the ones you want and click Connect selected (up to 100 at a time). Decuga creates a webhook on each (Push and Merge request events, SSL verification on, with a secret token) and marks it Connected. Use Remove webhook to disconnect later.

3

Test the connection

Push a branch containing a task code and verify it appears in the task’s Development section in Decuga.

Manual setup

Use this for self-hosted GitLab, or if you would rather not authorize Decuga. Click Set up manually next to the connect button.

1

Install the GitLab connector in Decuga

Enter one field:

  • Webhook Secret Token - any random string you choose

After saving, Decuga shows your Webhook URL:

text
https://decuga.com/api/webhooks/vcs/gitlab/<your-project-id>
2

Create the webhook on GitLab

Go to Project → Settings → Webhooks and add a new webhook:

  • URL - the webhook URL from step 1
  • Secret token - the same string from step 1
  • Trigger - tick Push events and Merge request events
  • SSL verification - leave enabled
3

Test the connection

Click Test → Push events on the GitLab webhook page. You should see a green ✅.

Existing webhooks & projects shared by several Decuga projects

Authorizing keeps your existing installation and secret, so webhooks you added by hand keep working. Connecting a GitLab project that already has a webhook for this Decuga project adopts it (re-keys it) rather than adding a duplicate.

Each Decuga project has its own webhook URL and secret, so one GitLab project can feed several Decuga projects without conflict. The list shows “also in N other projects”for information; connecting or removing a webhook never affects another Decuga project’s webhook.

Automations

Identical to the GitHub integration:

  • Push → In Progress: branch name or commit message references a task → task moves from To Do / On Hold to In Progress.
  • MR opened / reopened / merged / closed → Automation triggers: nothing is created automatically. Add a rule under Automations, for example Create a sub-task titled “Review MR: {{prTitle}}” when a merge request is opened, assigned to the MR assignee if it can be matched to a member.
  • MR closed / merged → Link state updated: the Development panel reflects the final state.
GitLab uses the term Merge Request (MR)instead of Pull Request. Decuga labels these as “PR / MR” in the UI.

Troubleshooting

GitLab shows 401 Unauthorized for my webhook.

The X-Gitlab-Token you configured on GitLab does not match the Webhook Secret Token stored in Decuga. Update one of them so they match exactly.

A project is missing from the list, or connecting it fails.

Only non-archived projects where you are a Maintainer or Owner are listed. If GitLab reports the token as expired or revoked, click Reconnect and authorize again.

Push events are received but MR events are not.

Make sure you ticked both "Push events" and "Merge request events" when creating the webhook on GitLab.

Task code not detected.

Codes must be uppercase: e.g. PROJ-42. Lowercase (proj-42) or numeric-only identifiers are not matched.