Commit 4b3d90b
committed
fix(ci): give push builds the parent commit their audits diff against
Push builds fail the migration audit:
✗ Migration safety check could not run.
Cannot diff against 'HEAD~1'.
`actions/checkout` sets no `fetch-depth`, so it defaults to 1 — a single-commit
clone in which `HEAD~1` does not resolve. Both diff-based audits name `HEAD~1`
as their base on push events, so neither has ever had a base to read.
The migration audit used to answer that with `✓ No new migrations to check` and
exit 0, so it had never run on a push build at all; #7022 made it say it could
not run instead, which is what surfaced this. The block-registry check has the
same input and reports `⚠ … skipping` — visible, but also never run on push.
`fetch-depth: 2` on the audit job's checkout gives `HEAD~1` something to name.
Verified in a two-commit repo: at depth 1 `git rev-parse HEAD~1` does not
resolve, at depth 2 it does and `git diff HEAD~1 HEAD` reports the change. Both
audits pass against `HEAD~1` on a checkout with history.
Only the audit job changes; Build App keeps its depth-1 checkout.1 parent 67fc2ae commit 4b3d90b
1 file changed
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
17 | 23 | | |
18 | 24 | | |
| 25 | + | |
| 26 | + | |
19 | 27 | | |
20 | 28 | | |
21 | 29 | | |
| |||
0 commit comments