Skip to content

Commit d205f64

Browse files
committed
ci: restore upstream audit base selection
1 parent 2325372 commit d205f64

4 files changed

Lines changed: 11 additions & 296 deletions

File tree

‎.github/scripts/resolve-audit-base.sh‎

Lines changed: 0 additions & 42 deletions
This file was deleted.

‎.github/workflows/checks.yml‎

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -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 }}"

‎.github/workflows/ci.yml‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,6 @@ permissions:
3333
jobs:
3434
checks:
3535
name: checks
36-
permissions:
37-
contents: read
38-
pull-requests: read
3936
if: github.ref != 'refs/heads/dev' || github.event_name == 'pull_request'
4037
uses: ./.github/workflows/checks.yml
4138

‎scripts/audit-base-workflow.test.ts‎

Lines changed: 0 additions & 242 deletions
This file was deleted.

0 commit comments

Comments
 (0)