fix(ci): use GITHUB_EVENT_BEFORE for push events in runtime-prbuild-compat detect-changes (#917) #919
Merged
devops-engineer
merged 1 commits from 2026-05-14 01:33:30 +00:00
fix/917-runtime-prbuild-detect-changes-fix into main
1 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
| bd32e8cfd9 |
fix(ci): use GITHUB_EVENT_BEFORE for push events in runtime-prbuild-compat detect-changes
Some checks are pending
CI / Detect changes (pull_request) Waiting to run
CI / Platform (Go) (pull_request) Blocked by required conditions
CI / Canvas (Next.js) (pull_request) Blocked by required conditions
CI / Shellcheck (E2E scripts) (pull_request) Blocked by required conditions
CI / Canvas Deploy Reminder (pull_request) Blocked by required conditions
CI / Python Lint & Test (pull_request) Blocked by required conditions
E2E API Smoke Test / detect-changes (pull_request) Waiting to run
E2E API Smoke Test / E2E API Smoke Test (pull_request) Blocked by required conditions
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Waiting to run
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Blocked by required conditions
Handlers Postgres Integration / detect-changes (pull_request) Waiting to run
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Blocked by required conditions
lint-continue-on-error-tracking / lint-continue-on-error-tracking (pull_request) Waiting to run
Lint curl status-code capture / Scan workflows for curl status-capture pollution (pull_request) Waiting to run
Lint pre-flip continue-on-error / Verify continue-on-error flips have run-log proof (pull_request) Waiting to run
lint-required-context-exists-in-bp / lint-required-context-exists-in-bp (pull_request) Waiting to run
lint-required-no-paths / lint-required-no-paths (pull_request) Waiting to run
Lint workflow YAML (Gitea-1.22.6-hostile shapes) / Lint workflow YAML for Gitea-1.22.6-hostile shapes (pull_request) Waiting to run
Runtime PR-Built Compatibility / detect-changes (pull_request) Waiting to run
Runtime PR-Built Compatibility / PR-built wheel + import smoke (pull_request) Blocked by required conditions
Secret scan / Scan diff for credential-shaped strings (pull_request) Waiting to run
gate-check-v3 / gate-check (pull_request) Waiting to run
qa-review / approved (pull_request) Waiting to run
security-review / approved (pull_request) Waiting to run
sop-checklist-gate / gate (pull_request) Waiting to run
sop-tier-check / tier-check (pull_request) Waiting to run
CI / all-required (pull_request) injected
sop-checklist / all-items-acked (pull_request) injected
audit-force-merge / audit (pull_request) Waiting to run
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 19s
Fixes: #917 Root cause: Gitea Actions does not expose github.event.before as a shell environment variable for push events. The ${{ github.event.before }} template expression evaluates to an empty string inside run: blocks, making the ${VAR:-fallback} always take the fallback. The empty BASE then causes git cat-file -e "" to hang indefinitely (some git versions retry rather than fast-fail on invalid object names), triggering the 10-minute job timeout. Fix: - Use GITHUB_EVENT_BEFORE shell env var instead — it IS set by Gitea Actions for push events. - Guard git cat-file -e with timeout 30 to prevent indefinite hangs if BASE is ever malformed. - Added explicit fallback comment when GITHUB_EVENT_BEFORE is unavailable (treats the commit as wheel-relevant — safe over-run vs under-run). Test plan: - [x] YAML lint passes - [ ] CI detect-changes completes without 10-minute timeout on push event - [ ] No regression for pull_request events (base SHA logic unchanged) Refs: #917 |