You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ci: Merge PR validation workflows and add reason-specific labels (#5898)
Combine `close-unvetted-pr.yml` and `enforce-draft-pr.yml` into a single
`validate-pr.yml` workflow so the draft enforcer doesn't run on PRs that
were already closed by the vetting check.
**How it works:**
- `validate-non-maintainer-pr` job runs first on `opened` and `reopened`
events, outputs `was-closed` if it closes the PR
- `enforce-draft` job depends on the first job via `needs:` and skips
when `was-closed == 'true'` (uses `if: always()` so it still runs when
the first job is skipped or succeeds without closing)
Each closure reason now also gets a specific label alongside
`violating-contribution-guidelines`:
- `missing-issue-reference` — no issue ref in body, or referenced issues
not found
- `missing-maintainer-discussion` — no prior discussion between author
and a maintainer
- `issue-already-assigned` — referenced issue assigned to someone other
than the PR author
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
'3. Once a maintainer has acknowledged your proposed approach, open a new PR referencing the issue',
135
140
'',
136
141
`Please review our [contributing guidelines](${contributingUrl}) for more details.`,
137
-
].join('\n'));
142
+
].join('\n'), 'missing-issue-reference');
138
143
return;
139
144
}
140
145
@@ -222,7 +227,7 @@ jobs:
222
227
'If you believe this assignment is outdated, please comment on the issue to discuss before opening a new PR.',
223
228
'',
224
229
`Please review our [contributing guidelines](${contributingUrl}) for more details.`,
225
-
].join('\n'));
230
+
].join('\n'), 'issue-already-assigned');
226
231
return;
227
232
}
228
233
@@ -234,7 +239,7 @@ jobs:
234
239
'To avoid wasted effort on both sides, please discuss your proposed approach in the issue first and wait for a maintainer to respond before opening a PR.',
235
240
'',
236
241
`Please review our [contributing guidelines](${contributingUrl}) for more details.`,
237
-
].join('\n'));
242
+
].join('\n'), 'missing-maintainer-discussion');
238
243
return;
239
244
}
240
245
@@ -249,4 +254,74 @@ jobs:
249
254
'3. Once a maintainer has acknowledged your proposed approach, open a new PR referencing the issue',
250
255
'',
251
256
`Please review our [contributing guidelines](${contributingUrl}) for more details.`,
0 commit comments