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({