Skip to main content
GitLab Logo

Link GitLab issues and merge requests to your Flagsmith feature flags. When a flag changes state, Flagsmith posts a comment to the linked issue or MR showing the flag's current state across all environments.

Flagsmith offers two integration cards depending on your GitLab setup:

  • GitLab — for teams using GitLab.com. One-click OAuth.
  • GitLab Self-Hosted — for teams running their own GitLab instance. Uses a personal access token.

Both integrations share the same features once connected.

Setup: GitLab.com

  1. In Flagsmith, go to Integrations > GitLab > Add Integration.
  2. Click "Authorise". You will be sent to GitLab to grant Flagsmith access.
  3. Once back in Flagsmith, the integration is active. ✅
note

Flagsmith requests the api scope, which grants read and write access to the GitLab API. This is required to post comments and manage labels on your issues and merge requests.

Setup: Self-hosted GitLab

  1. In GitLab
    1. Open your Access Tokens settings.
    2. Create a new token with the api scope.
    3. Copy the token — you will not see it again.
  2. In Flagsmith
    1. Go to Integrations > GitLab Self-Hosted > Add Integration.
    2. Set the GitLab Instance URL to your instance (e.g. https://gitlab.example.com).
    3. Paste the access token.
    4. Click "Save". ✅
tip

Personal access tokens on GitLab expire after at most 365 days (400 days on GitLab 17.6+). Remember to rotate your token before it expires.

Linking issues and merge requests to feature flags

  1. Open a feature flag and go to the Link tab.
  2. Select a GitLab project.
  3. Choose Issue or Merge Request.
  4. Search and select the item you want to link.

Flagsmith will post a comment to the linked issue or MR with the flag's current state across all environments. When the flag state changes, a new comment is posted automatically.

A Flagsmith Flag label is added to linked issues and merge requests so your team can filter for them in GitLab.

Removing the integration

Go to Integrations > GitLab > Manage Integration > Delete Integration.