@@ -524,9 +524,6 @@ jobs:
524524 # kept off the test shards so neither waits on the other.
525525 lint :
526526 name : lint
527- permissions :
528- contents : read
529- pull-requests : read
530527 runs-on : *runner-4vcpu
531528 timeout-minutes : 15
532529
@@ -616,14 +613,19 @@ jobs:
616613 # It is fetched by SHA at depth 1; the audits diff two tips and need no
617614 # common ancestry. An all-zero `before` means the branch is new and has no
618615 # predecessor to diff, so `HEAD~1` remains the fallback there.
619- # Manual runs pin the actual base SHA of the dispatched branch's unique open PR.
620- # A merge commit's first parent does not identify a stacked PR's review base.
621616 - name : Resolve base ref for diff-based audits
622617 id : audit_base
623- env :
624- GH_TOKEN : ${{ github.token }}
625- GITHUB_BEFORE : ${{ github.event.before }}
626- run : bash .github/scripts/resolve-audit-base.sh
618+ run : |
619+ if [ "${{ github.event_name }}" = "pull_request" ]; then
620+ git fetch --depth=1 origin "${{ github.base_ref }}"
621+ echo "ref=origin/${{ github.base_ref }}" >> "$GITHUB_OUTPUT"
622+ elif [ -n "${{ github.event.before }}" ] &&
623+ [ "${{ github.event.before }}" != "0000000000000000000000000000000000000000" ]; then
624+ git fetch --depth=1 origin "${{ github.event.before }}"
625+ echo "ref=${{ github.event.before }}" >> "$GITHUB_OUTPUT"
626+ else
627+ echo "ref=HEAD~1" >> "$GITHUB_OUTPUT"
628+ fi
627629
628630 - name : Check block registry invariants
629631 run : bun run apps/sim/scripts/check-block-registry.ts "${{ steps.audit_base.outputs.ref }}"
0 commit comments