From 76d4799ffae5e6b3c3484ebc0ec989bcd3124da0 Mon Sep 17 00:00:00 2001 From: Matthew Li Date: Thu, 7 May 2026 12:55:14 -0700 Subject: [PATCH] ci: allow `campaigner-automated-change` label The PR label-validation workflow only accepts labels matching one of a small set of category prefixes (`type:`, `comp:`, `inst:`, `tag:`, ...). Labels applied by external automation (e.g. Campaigner) don't follow that scheme, so they trip the check and the PR gets a sticky blocking comment that requires a maintainer to remove. Add an explicit exact-match allowlist alongside the prefix list so known-good labels from automation tooling can pass without conflating the "category prefix" concept with "exact label name". Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/check-pull-request-labels.yaml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/check-pull-request-labels.yaml b/.github/workflows/check-pull-request-labels.yaml index 74fe2c5c845..fbcc7303afe 100644 --- a/.github/workflows/check-pull-request-labels.yaml +++ b/.github/workflows/check-pull-request-labels.yaml @@ -141,6 +141,11 @@ jobs: 'performance:', // To refactor to 'ci: ' in the future 'run-tests:' // Unused since GitLab migration ] + // Exact-match labels that don't fit a category prefix (e.g. labels applied + // by external automation tooling). + const exactAllowlist = [ + 'campaigner-automated-change' + ] // Re-fetch labels only if the previous step modified them (ex: "Bits AI" removal) let prLabels if (process.env.LABELS_STALE === 'true') { @@ -156,7 +161,10 @@ jobs: // Look for invalid labels const invalidLabels = prLabels .map(label => label.name) - .filter(label => validCategories.every(prefix => !label.startsWith(prefix))) + .filter(label => + !exactAllowlist.includes(label) && + validCategories.every(prefix => !label.startsWith(prefix)) + ) const hasInvalidLabels = invalidLabels.length > 0 // Get existing comments to check for blocking comment const comments = await github.rest.issues.listComments({