Skip to content

Commit 95c48c6

Browse files
committed
ci: open the two borrow jobs' if: with the pr-event terms
check-expected-skips derives a job's PR and queue skip from the github.event_name != 'pull_request' / != 'merge_group' terms, and reads neither a bare push term nor a needs output. The behaviour is unchanged: the push term and the covered output still decide. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jQztfi9hnsaBeBVcCU
1 parent 80eca7d commit 95c48c6

2 files changed

Lines changed: 11 additions & 4 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,9 @@ jobs:
189189
queue-verdict:
190190
name: Queue verdict
191191
# Push only, and before anything else: every borrowing job needs it.
192-
if: github.event_name == 'push'
192+
# The two pr-event terms come first so check-expected-skips reads the
193+
# skip on a PR and in the queue as expected; the push term decides.
194+
if: github.event_name != 'pull_request' && github.event_name != 'merge_group' && github.event_name == 'push'
193195
runs-on: ubuntu-latest
194196
timeout-minutes: 5
195197
# `actions: read` is the merge_group run listings and the head run's jobs;
@@ -231,7 +233,8 @@ jobs:
231233
# re-reads the head commit's queue run. Do not rename it.
232234
name: Borrowed queue verdict
233235
needs: queue-verdict
234-
if: ${{ success() && needs.queue-verdict.outputs.covered == 'true' }}
236+
# The pr-event terms are for check-expected-skips, as on queue-verdict.
237+
if: ${{ success() && github.event_name != 'pull_request' && github.event_name != 'merge_group' && needs.queue-verdict.outputs.covered == 'true' }}
235238
runs-on: ubuntu-latest
236239
timeout-minutes: 10
237240
permissions:

‎scripts/ci/scheduled-full-run.mjs‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1553,8 +1553,12 @@ export function borrowedRecordOf(jobs) {
15531553
// runs only on a covered push; every read of `covered` compares with the
15541554
// literal 'true', so an empty output (a probe that died) means the full
15551555
// battery; and no main-only job reads it at all.
1556-
export const QUEUE_VERDICT_IF = "github.event_name == 'push'";
1557-
export const BORROWED_VERDICT_IF = `\${{ success() && needs.${QUEUE_VERDICT_JOB}.outputs.covered == 'true' }}`;
1556+
// Each opens with the two pr-event terms check-expected-skips derives a
1557+
// PR / queue skip from (it reads no push term and no needs output); the
1558+
// last term is the one that decides, so the behaviour is the push term's.
1559+
const PR_EVENT_TERMS = "github.event_name != 'pull_request' && github.event_name != 'merge_group'";
1560+
export const QUEUE_VERDICT_IF = `${PR_EVENT_TERMS} && github.event_name == 'push'`;
1561+
export const BORROWED_VERDICT_IF = `\${{ success() && ${PR_EVENT_TERMS} && needs.${QUEUE_VERDICT_JOB}.outputs.covered == 'true' }}`;
15581562
export const MAIN_ONLY_JOBS = Object.freeze(['temporal-conformance', 'dogfood-verify', 'ui-published-artifacts']);
15591563
export function borrowedVerdictWiring(ciYamlText) {
15601564
const findings = [];

0 commit comments

Comments
 (0)