Context: #7000
When a linked GitLab issue or MR changes state (closed, merged, reopened), Flagsmith should update the feature flag's tags automatically.
Scope
Tags
The following tags mirror the GitHub integration's tagging behaviour, adapted for GitLab terminology.
| GitLab event |
Tag |
| Issue opened / reopened |
Issue Open |
| Issue closed |
Issue Closed |
| MR opened / reopened |
MR Open |
| MR closed |
MR Closed |
| MR merged |
MR Merged |
| MR converted to draft |
MR Draft |
Suggested implementation
- Add
TagType.GITLAB; follow the GitHub tagging pattern.
- New model to track registered webhooks: GitLab project path, webhook ID, and secret per
GitLabConfiguration.
- Expose a webhook receiver endpoint. Include the webhook tracking model's ID in the URL so the receiver can look up the secret directly.
- Verify incoming payloads via
X-Gitlab-Token.
- Register a project webhook when a resource is first linked from a given GitLab project, using the URL-encoded path extracted from the resource URL.
- Deregister webhooks on
GitLabConfiguration deletion.
Acceptance criteria
Context: #7000
When a linked GitLab issue or MR changes state (closed, merged, reopened), Flagsmith should update the feature flag's tags automatically.
Scope
issues_eventsandmerge_requests_events.Tags
The following tags mirror the GitHub integration's tagging behaviour, adapted for GitLab terminology.
Issue OpenIssue ClosedMR OpenMR ClosedMR MergedMR DraftSuggested implementation
TagType.GITLAB; follow the GitHub tagging pattern.GitLabConfiguration.X-Gitlab-Token.GitLabConfigurationdeletion.Acceptance criteria