ci: skip checks for draft pull requests [skip ci] (#29484)

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
This commit is contained in:
OrcaWin
2026-10-15 23:18:13 -07:00
committed by GitHub
co-authored by OrcaWin
parent 3074852b7c
commit fc584d425b
33 changed files with 138 additions and 17 deletions
@@ -18,8 +18,8 @@ export function verifyRequiredPrContext(parseYaml) {
}
const gate = providers[0].job
const condition = gate.if?.replace(/^\$\{\{\s*|\s*\}\}$/g, '').trim()
if (condition !== '!cancelled()') {
throw new Error('Required PR aggregate must run unless the workflow is cancelled.')
if (condition !== '!cancelled() && github.event.pull_request.draft != true') {
throw new Error('Required PR aggregate must run unless cancelled or the PR is a draft.')
}
if (gate['continue-on-error'] || gate.steps?.some((step) => step['continue-on-error'])) {
throw new Error('Required PR aggregate must not ignore failures.')