From 96a7f00f86e8c0ac0aa47da2ec3ef732bf099b6f Mon Sep 17 00:00:00 2001 From: Evandro Myller Date: Tue, 7 Apr 2026 00:52:40 -0300 Subject: [PATCH 1/6] docs(GitLab): Add integration documentation for GitLab.com and self-hosted Co-Authored-By: Claude Opus 4.6 (1M context) --- .../project-management/gitlab.md | 75 +++++++++++++++++++ .../img/integrations/gitlab/gitlab-logo.svg | 36 +++++++++ 2 files changed, 111 insertions(+) create mode 100644 docs/docs/third-party-integrations/project-management/gitlab.md create mode 100644 docs/static/img/integrations/gitlab/gitlab-logo.svg diff --git a/docs/docs/third-party-integrations/project-management/gitlab.md b/docs/docs/third-party-integrations/project-management/gitlab.md new file mode 100644 index 000000000000..8d6756174680 --- /dev/null +++ b/docs/docs/third-party-integrations/project-management/gitlab.md @@ -0,0 +1,75 @@ +--- +title: GitLab Integration +description: Link GitLab issues and merge requests to Flagsmith feature flags +sidebar_label: GitLab +hide_title: true +--- + +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. +1. Click "Authorise". You will be sent to GitLab to grant Flagsmith access. +1. Once back in Flagsmith, the integration is active. ✅ + +:::note + +Flagsmith requests the `api` +[scope](https://docs.gitlab.com/integration/oauth_provider/), 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](https://docs.gitlab.com/user/profile/personal_access_tokens/). + 1. Create a new token with the `api` scope. + 1. Copy the token — you will not see it again. +1. **In Flagsmith** + 1. Go to Integrations > **GitLab Self-Hosted** > Add Integration. + 1. Set the **GitLab Instance URL** to your instance + (e.g. `https://gitlab.example.com`). + 1. Paste the access token. + 1. Click "Save". ✅ + +:::tip + +Personal access tokens on GitLab +[expire after at most 365 days](https://docs.gitlab.com/user/profile/personal_access_tokens/) +(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. +1. Select a GitLab project. +1. Choose **Issue** or **Merge Request**. +1. 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. diff --git a/docs/static/img/integrations/gitlab/gitlab-logo.svg b/docs/static/img/integrations/gitlab/gitlab-logo.svg new file mode 100644 index 000000000000..016ed1848131 --- /dev/null +++ b/docs/static/img/integrations/gitlab/gitlab-logo.svg @@ -0,0 +1,36 @@ + + \ No newline at end of file From 058794bab848acd3751bdf1361408d6ac3a65eb4 Mon Sep 17 00:00:00 2001 From: Evandro Myller Date: Tue, 7 Apr 2026 13:37:44 -0300 Subject: [PATCH 2/6] docs(GitLab): Add automatic state sync section Co-Authored-By: Claude Opus 4.6 (1M context) --- .../third-party-integrations/project-management/gitlab.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/docs/third-party-integrations/project-management/gitlab.md b/docs/docs/third-party-integrations/project-management/gitlab.md index 8d6756174680..305c21ee4058 100644 --- a/docs/docs/third-party-integrations/project-management/gitlab.md +++ b/docs/docs/third-party-integrations/project-management/gitlab.md @@ -70,6 +70,13 @@ posted automatically. A **Flagsmith Flag** label is added to linked issues and merge requests so your team can filter for them in GitLab. +## Automatic state sync + +When a linked issue or merge request changes state in GitLab — closed, merged, +or reopened — Flagsmith automatically updates the linked feature flag's tags to +reflect the current state. This is powered by webhooks that Flagsmith registers +on your GitLab projects automatically. + ## Removing the integration Go to Integrations > GitLab > Manage Integration > Delete Integration. From 1f9e7c5d4594018779eaea4fd8f7b65fc694287d Mon Sep 17 00:00:00 2001 From: Evandro Myller Date: Tue, 7 Apr 2026 15:23:13 -0300 Subject: [PATCH 3/6] Fix text --- docs/docs/third-party-integrations/project-management/gitlab.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/third-party-integrations/project-management/gitlab.md b/docs/docs/third-party-integrations/project-management/gitlab.md index 305c21ee4058..aac12da6f0f2 100644 --- a/docs/docs/third-party-integrations/project-management/gitlab.md +++ b/docs/docs/third-party-integrations/project-management/gitlab.md @@ -11,7 +11,7 @@ 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: +Flagsmith offers two integration options 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 From ede017d32843b72ec5f9c27eb7df82323073d99b Mon Sep 17 00:00:00 2001 From: Evandro Myller Date: Wed, 8 Apr 2026 17:56:08 -0300 Subject: [PATCH 4/6] Add GitLab group as a required setup field Co-Authored-By: Claude Opus 4.6 (1M context) --- .../third-party-integrations/project-management/gitlab.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/docs/third-party-integrations/project-management/gitlab.md b/docs/docs/third-party-integrations/project-management/gitlab.md index aac12da6f0f2..64c97892f0d0 100644 --- a/docs/docs/third-party-integrations/project-management/gitlab.md +++ b/docs/docs/third-party-integrations/project-management/gitlab.md @@ -22,6 +22,7 @@ Both integrations share the same features once connected. ## Setup: GitLab.com 1. In Flagsmith, go to Integrations > **GitLab** > Add Integration. +1. Enter your **GitLab Group** (e.g. `my-company` — the path from your GitLab URL). 1. Click "Authorise". You will be sent to GitLab to grant Flagsmith access. 1. Once back in Flagsmith, the integration is active. ✅ @@ -45,6 +46,7 @@ manage labels on your issues and merge requests. 1. Go to Integrations > **GitLab Self-Hosted** > Add Integration. 1. Set the **GitLab Instance URL** to your instance (e.g. `https://gitlab.example.com`). + 1. Enter your **GitLab Group** (e.g. `my-company`). 1. Paste the access token. 1. Click "Save". ✅ @@ -59,7 +61,7 @@ Personal access tokens on GitLab ## Linking issues and merge requests to feature flags 1. Open a feature flag and go to the **Link** tab. -1. Select a GitLab project. +1. Select a GitLab project from your connected group. 1. Choose **Issue** or **Merge Request**. 1. Search and select the item you want to link. From 8f0ebc80e052be9b642fb02c1b88a648e20a709d Mon Sep 17 00:00:00 2001 From: Evandro Myller Date: Wed, 8 Apr 2026 19:47:59 -0300 Subject: [PATCH 5/6] =?UTF-8?q?Epic=20v1=20=F0=9F=A4=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../project-management/gitlab.md | 41 ++++--------------- 1 file changed, 9 insertions(+), 32 deletions(-) diff --git a/docs/docs/third-party-integrations/project-management/gitlab.md b/docs/docs/third-party-integrations/project-management/gitlab.md index 64c97892f0d0..a53f1d400adb 100644 --- a/docs/docs/third-party-integrations/project-management/gitlab.md +++ b/docs/docs/third-party-integrations/project-management/gitlab.md @@ -11,50 +11,27 @@ 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 options depending on your GitLab setup: +## 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. -1. Enter your **GitLab Group** (e.g. `my-company` — the path from your GitLab URL). -1. Click "Authorise". You will be sent to GitLab to grant Flagsmith access. -1. Once back in Flagsmith, the integration is active. ✅ - -:::note - -Flagsmith requests the `api` -[scope](https://docs.gitlab.com/integration/oauth_provider/), 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 +The integration requires a token with access to the full GitLab group — +either a [personal access token](https://docs.gitlab.com/user/profile/personal_access_tokens/) +or a [group access token](https://docs.gitlab.com/user/group/settings/group_access_tokens/). +Project access tokens are not supported yet. 1. **In GitLab** - 1. Open your - [Access Tokens settings](https://docs.gitlab.com/user/profile/personal_access_tokens/). - 1. Create a new token with the `api` scope. + 1. Create a personal access token or group access token with the `api` scope. 1. Copy the token — you will not see it again. 1. **In Flagsmith** - 1. Go to Integrations > **GitLab Self-Hosted** > Add Integration. + 1. Go to Integrations > **GitLab** > Add Integration. 1. Set the **GitLab Instance URL** to your instance - (e.g. `https://gitlab.example.com`). + (e.g. `https://gitlab.example.com` or `https://gitlab.com`). 1. Enter your **GitLab Group** (e.g. `my-company`). 1. Paste the access token. 1. Click "Save". ✅ :::tip -Personal access tokens on GitLab -[expire after at most 365 days](https://docs.gitlab.com/user/profile/personal_access_tokens/) -(400 days on GitLab 17.6+). Remember to rotate your token before it expires. +Remember to rotate your GitLab access token before it expires. ::: From 8da42486f3b6aee6bf80b89dda75cac0778ae731 Mon Sep 17 00:00:00 2001 From: Evandro Myller Date: Wed, 8 Apr 2026 20:30:13 -0300 Subject: [PATCH 6/6] =?UTF-8?q?ALL=20TOKEN=20TYPES=20SUPPORTED=20?= =?UTF-8?q?=F0=9F=8E=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../project-management/gitlab.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/docs/docs/third-party-integrations/project-management/gitlab.md b/docs/docs/third-party-integrations/project-management/gitlab.md index a53f1d400adb..f1bf082f2fe1 100644 --- a/docs/docs/third-party-integrations/project-management/gitlab.md +++ b/docs/docs/third-party-integrations/project-management/gitlab.md @@ -13,19 +13,20 @@ the flag's current state across all environments. ## Setup -The integration requires a token with access to the full GitLab group — -either a [personal access token](https://docs.gitlab.com/user/profile/personal_access_tokens/) -or a [group access token](https://docs.gitlab.com/user/group/settings/group_access_tokens/). -Project access tokens are not supported yet. +The integration supports +[personal access tokens](https://docs.gitlab.com/user/profile/personal_access_tokens/), +[group access tokens](https://docs.gitlab.com/user/group/settings/group_access_tokens/), +and [project access tokens](https://docs.gitlab.com/user/project/settings/project_access_tokens/). +All require the `api` scope. The token type determines which projects are +accessible in Flagsmith. 1. **In GitLab** - 1. Create a personal access token or group access token with the `api` scope. + 1. Create an access token with the `api` scope. 1. Copy the token — you will not see it again. 1. **In Flagsmith** 1. Go to Integrations > **GitLab** > Add Integration. 1. Set the **GitLab Instance URL** to your instance (e.g. `https://gitlab.example.com` or `https://gitlab.com`). - 1. Enter your **GitLab Group** (e.g. `my-company`). 1. Paste the access token. 1. Click "Save". ✅ @@ -38,7 +39,7 @@ Remember to rotate your GitLab access token before it expires. ## Linking issues and merge requests to feature flags 1. Open a feature flag and go to the **Link** tab. -1. Select a GitLab project from your connected group. +1. Select a GitLab project. 1. Choose **Issue** or **Merge Request**. 1. Search and select the item you want to link.