mirror of
https://github.com/stablyai/orca.git
synced 2026-10-31 00:57:45 +00:00
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:
@@ -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.')
|
||||
|
||||
Reference in New Issue
Block a user