Skip to content

Commit 1129838

Browse files
mhlidddevflow.devflow-routing-intake
andauthored
ci: allow campaigner-automated-change label (#11311)
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) <noreply@anthropic.com> Co-authored-by: devflow.devflow-routing-intake <devflow.devflow-routing-intake@kubernetes.us1.ddbuild.io>
1 parent 7c51d40 commit 1129838

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

.github/workflows/check-pull-request-labels.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,11 @@ jobs:
141141
'performance:', // To refactor to 'ci: ' in the future
142142
'run-tests:' // Unused since GitLab migration
143143
]
144+
// Exact-match labels that don't fit a category prefix (e.g. labels applied
145+
// by external automation tooling).
146+
const exactAllowlist = [
147+
'campaigner-automated-change'
148+
]
144149
// Re-fetch labels only if the previous step modified them (ex: "Bits AI" removal)
145150
let prLabels
146151
if (process.env.LABELS_STALE === 'true') {
@@ -156,7 +161,10 @@ jobs:
156161
// Look for invalid labels
157162
const invalidLabels = prLabels
158163
.map(label => label.name)
159-
.filter(label => validCategories.every(prefix => !label.startsWith(prefix)))
164+
.filter(label =>
165+
!exactAllowlist.includes(label) &&
166+
validCategories.every(prefix => !label.startsWith(prefix))
167+
)
160168
const hasInvalidLabels = invalidLabels.length > 0
161169
// Get existing comments to check for blocking comment
162170
const comments = await github.rest.issues.listComments({

0 commit comments

Comments
 (0)