Skip to content

feat(GitHub): label linked issues and merge requests#7307

Open
Zaimwa9 wants to merge 18 commits intomainfrom
feat/label-linked-issues-and-mrs
Open

feat(GitHub): label linked issues and merge requests#7307
Zaimwa9 wants to merge 18 commits intomainfrom
feat/label-linked-issues-and-mrs

Conversation

@Zaimwa9
Copy link
Copy Markdown
Contributor

@Zaimwa9 Zaimwa9 commented Apr 22, 2026

Thanks for submitting a PR! Please check the boxes below:

  • I have read the Contributing Guide.
  • I have added information to docs/ if required so people know about the feature.
  • I have filled in the "Changes" section below.
  • I have filled in the "How did you test this code" section below.

Changes

Closes #7163

Backend
Adds Labelling Issues/MRs linked to feature flag on linking/unlinking

  • New config GitLabConfiguration.tagging_enabled
  • Linking issue or MR adds the label to the targeted resource in gitlab, entry point integrations.gitlab.services.apply_flagsmith_label_to_resource(resource)
    • Emits gitlab.label.created, gitlab.label.applied, gitlab.label.failed
  • Unlinking dispatches a task to remove the label if the feature was the last one linked to the resource
    • Uses @hook(BEFORE_DELETE)
    • remove_flagsmith_label_from_gitlab_issue/merge_request -> PUT with remove_labels
    • Emits gitlab.label.removed / gitlab.label.removal_failed

Frontend

  • tagging_enabled checkbox in integration form enabling linking the issue

How did you test this code?

  • New tests

Manual E2E

  1. Configure GitLab integration with a PAT, tick the labelling checkbox.
  2. Link an issue → label appears on GitLab with the Flagsmith colour.
  3. Link a second issue → label reused (no duplicate).
  4. Toggle off → new links don't label.
  5. Unlink the last feature referencing an issue → label removed in the background.
  6. Unlink while another flag still references the issue → label stays.
  7. Revoke the token, attempt to link with tagging on → request fails 4xx with a user-facing error, link not created.
image image image

@Zaimwa9 Zaimwa9 requested review from a team as code owners April 22, 2026 07:56
@Zaimwa9 Zaimwa9 requested review from emyller and talissoncosta and removed request for a team April 22, 2026 07:56
Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Code review skipped — your organization's overage spend limit has been reached.

Code review is billed via overage credits. To resume reviews, an organization admin can raise the monthly limit at claude.ai/admin-settings/claude-code.

Once credits are available, reopen this pull request to trigger a review.

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 22, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment Apr 24, 2026 7:43am
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
flagsmith-frontend-preview Ignored Ignored Preview Apr 24, 2026 7:43am
flagsmith-frontend-staging Ignored Ignored Preview Apr 24, 2026 7:43am

Request Review

@github-actions github-actions Bot added front-end Issue related to the React Front End Dashboard api Issue related to the REST API labels Apr 22, 2026
@Zaimwa9 Zaimwa9 removed the request for review from emyller April 22, 2026 07:56
@Zaimwa9 Zaimwa9 marked this pull request as draft April 22, 2026 07:56
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 22, 2026

Docker builds report

Image Build Status Security report
ghcr.io/flagsmith/flagsmith-e2e:pr-7307 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-frontend:pr-7307 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-api:pr-7307 Finished ✅ Results
ghcr.io/flagsmith/flagsmith:pr-7307 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-private-cloud:pr-7307 Finished ✅ Results

@Zaimwa9 Zaimwa9 changed the title Feat/label linked issues and mrs feat: label linked issues and mrs Apr 22, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 22, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.43%. Comparing base (0fa5050) to head (43a03a6).

Additional details and impacted files
@@           Coverage Diff            @@
##             main    #7307    +/-   ##
========================================
  Coverage   98.42%   98.43%            
========================================
  Files        1392     1394     +2     
  Lines       52270    52432   +162     
========================================
+ Hits        51447    51609   +162     
  Misses        823      823            

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 22, 2026

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  11 passed

Details

stats  11 tests across 8 suites
duration  39.7 seconds
commit  ee40dbd
info  🔄 Run: #16243 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  11 passed

Details

stats  11 tests across 8 suites
duration  8.8 seconds
commit  ee40dbd
info  🔄 Run: #16243 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  1 minute, 2 seconds
commit  ee40dbd
info  🔄 Run: #16243 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  51.9 seconds
commit  ee40dbd
info  🔄 Run: #16243 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  11 passed

Details

stats  11 tests across 8 suites
duration  24.9 seconds
commit  6c543b4
info  🔄 Run: #16263 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  46.3 seconds
commit  6c543b4
info  🔄 Run: #16263 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  2 passed

Details

stats  2 tests across 2 suites
duration  54.8 seconds
commit  6c543b4
info  🔄 Run: #16263 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  2 passed

Details

stats  2 tests across 2 suites
duration  58.5 seconds
commit  6c543b4
info  🔄 Run: #16263 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  11 passed

Details

stats  11 tests across 8 suites
duration  44.1 seconds
commit  3abd218
info  🔄 Run: #16264 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  17 passed

Details

stats  17 tests across 14 suites
duration  1 minute, 1 second
commit  3abd218
info  🔄 Run: #16264 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  2 passed

Details

stats  2 tests across 2 suites
duration  46.8 seconds
commit  3abd218
info  🔄 Run: #16264 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  11 passed

Details

stats  11 tests across 8 suites
duration  45.9 seconds
commit  3abd218
info  🔄 Run: #16264 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  11 passed

Details

stats  11 tests across 8 suites
duration  43.5 seconds
commit  823ac8a
info  🔄 Run: #16265 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  11 passed

Details

stats  11 tests across 8 suites
duration  55.8 seconds
commit  823ac8a
info  🔄 Run: #16265 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  17 passed

Details

stats  17 tests across 14 suites
duration  1 minute, 1 second
commit  823ac8a
info  🔄 Run: #16265 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  45.1 seconds
commit  823ac8a
info  🔄 Run: #16265 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  11 passed

Details

stats  11 tests across 8 suites
duration  39.7 seconds
commit  be569ef
info  🔄 Run: #16283 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  11 passed

Details

stats  11 tests across 8 suites
duration  53.8 seconds
commit  be569ef
info  🔄 Run: #16283 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  2 passed

Details

stats  2 tests across 2 suites
duration  1 minute, 4 seconds
commit  be569ef
info  🔄 Run: #16283 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  50.9 seconds
commit  be569ef
info  🔄 Run: #16283 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  11 passed

Details

stats  11 tests across 8 suites
duration  9.3 seconds
commit  0724f4c
info  🔄 Run: #16294 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  11 passed

Details

stats  11 tests across 8 suites
duration  28.8 seconds
commit  0724f4c
info  🔄 Run: #16294 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  17 passed

Details

stats  17 tests across 14 suites
duration  1 minute, 3 seconds
commit  0724f4c
info  🔄 Run: #16294 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  53.3 seconds
commit  0724f4c
info  🔄 Run: #16294 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  11 passed

Details

stats  11 tests across 8 suites
duration  27.6 seconds
commit  40ab8b1
info  🔄 Run: #16298 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  11 passed

Details

stats  11 tests across 8 suites
duration  28.6 seconds
commit  40ab8b1
info  🔄 Run: #16298 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  17 passed

Details

stats  17 tests across 14 suites
duration  57.5 seconds
commit  40ab8b1
info  🔄 Run: #16298 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  17 passed

Details

stats  17 tests across 14 suites
duration  55.6 seconds
commit  40ab8b1
info  🔄 Run: #16298 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  11 passed

Details

stats  11 tests across 8 suites
duration  40 seconds
commit  8e59908
info  🔄 Run: #16307 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  11 passed

Details

stats  11 tests across 8 suites
duration  51.2 seconds
commit  8e59908
info  🔄 Run: #16307 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  2 passed

Details

stats  2 tests across 2 suites
duration  46 seconds
commit  8e59908
info  🔄 Run: #16307 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  1 minute, 8 seconds
commit  8e59908
info  🔄 Run: #16307 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  11 passed

Details

stats  11 tests across 8 suites
duration  25 seconds
commit  43a03a6
info  🔄 Run: #16308 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  11 passed

Details

stats  11 tests across 8 suites
duration  1.6 seconds
commit  43a03a6
info  🔄 Run: #16308 (attempt 1)

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 22, 2026

Visual Regression

16 screenshots compared. See report for details.
View full report

@github-actions github-actions Bot added docs Documentation updates feature New feature or request and removed docs Documentation updates feature New feature or request labels Apr 22, 2026
@emyller emyller changed the title feat: label linked issues and mrs feat(GitHub): label linked issues and merge requests Apr 22, 2026
@github-actions github-actions Bot added docs Documentation updates feature New feature or request and removed feature New feature or request docs Documentation updates labels Apr 22, 2026
@Zaimwa9 Zaimwa9 force-pushed the feat/label-linked-issues-and-mrs branch from 7bec8ac to 0724f4c Compare April 23, 2026 16:35
@github-actions github-actions Bot added feature New feature or request and removed feature New feature or request docs Documentation updates labels Apr 23, 2026
@github-actions github-actions Bot added the docs Documentation updates label Apr 23, 2026
@github-actions github-actions Bot added feature New feature or request and removed feature New feature or request docs Documentation updates labels Apr 23, 2026
@github-actions github-actions Bot added docs Documentation updates and removed feature New feature or request docs Documentation updates labels Apr 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api Issue related to the REST API feature New feature or request front-end Issue related to the React Front End Dashboard

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GitLab integration: label linked issues and MRs

3 participants