Merge pull request 'fix(ci): use GITHUB_EVENT_BEFORE in handlers-pg-integ detect-changes' (#937) from fix/handlers-pg-integ-event-before into main
Some checks failed
Handlers Postgres Integration / detect-changes (pull_request) Successful in 27s
qa-review / approved (pull_request) Successful in 17s
E2E API Smoke Test / detect-changes (pull_request) Successful in 36s
security-review / approved (pull_request) Successful in 14s
Harness Replays / Harness Replays (pull_request) Successful in 7s
Runtime PR-Built Compatibility / detect-changes (pull_request) Successful in 37s
CI / Canvas (Next.js) (pull_request) Successful in 11m44s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 8s
CI / Canvas Deploy Reminder (pull_request) Successful in 1s
publish-runtime-autobump / pr-validate (pull_request) Successful in 1m7s
CI / Platform (Go) (pull_request) Successful in 12m8s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 1m12s
sop-checklist / na-declarations (pull_request) awaiting /sop-n/a declaration for: qa-review, security-review
lint-continue-on-error-tracking / lint-continue-on-error-tracking (pull_request) Successful in 1m31s
Lint workflow YAML (Gitea-1.22.6-hostile shapes) / Lint workflow YAML for Gitea-1.22.6-hostile shapes (pull_request) Successful in 1m37s
Ops Scripts Tests / Ops scripts (unittest) (pull_request) Failing after 14m40s
CI / Python Lint & Test (pull_request) Failing after 14m4s
gate-check-v3 / gate-check (pull_request) Successful in 3s
lint-mask-pr-atomicity / lint-mask-pr-atomicity (pull_request) Failing after 59s
lint-required-context-exists-in-bp / lint-required-context-exists-in-bp (pull_request) Failing after 1m47s
Runtime PR-Built Compatibility / PR-built wheel + import smoke (pull_request) Failing after 13m57s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Failing after 14m2s
sop-checklist / all-items-acked (pull_request) Successful in 3s
Lint pre-flip continue-on-error / Verify continue-on-error flips have run-log proof (pull_request) Successful in 1m50s
sop-tier-check / tier-check (pull_request) Successful in 4s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 1m30s
CI / all-required (pull_request) Blocked by required conditions
publish-runtime-autobump / bump-and-tag (pull_request) Has been skipped
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 5s
Lint curl status-code capture / Scan workflows for curl status-capture pollution (pull_request) Successful in 9s
Harness Replays / detect-changes (pull_request) Successful in 11s
CI / Detect changes (pull_request) Successful in 19s
review-check-tests / review-check.sh regression tests (pull_request) Successful in 16s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 16s
CI / all-required (push) Blocked by required conditions
Block internal-flavored paths / Block forbidden paths (push) Successful in 14s
Lint curl status-code capture / Scan workflows for curl status-capture pollution (push) Successful in 17s
Secret scan / Scan diff for credential-shaped strings (push) Successful in 16s
CI / Detect changes (push) Successful in 55s
E2E API Smoke Test / detect-changes (push) Successful in 55s
E2E Staging Canvas (Playwright) / detect-changes (push) Successful in 55s
Handlers Postgres Integration / detect-changes (push) Successful in 48s
Runtime PR-Built Compatibility / detect-changes (push) Successful in 45s
gitea-merge-queue / queue (push) Successful in 21s
Lint workflow YAML (Gitea-1.22.6-hostile shapes) / Lint workflow YAML for Gitea-1.22.6-hostile shapes (push) Successful in 1m36s
lint-continue-on-error-tracking / lint-continue-on-error-tracking (push) Successful in 2m32s
CI / Platform (Go) (push) Successful in 6s
CI / Canvas (Next.js) (push) Successful in 6s
CI / Shellcheck (E2E scripts) (push) Successful in 6s
CI / Python Lint & Test (push) Successful in 8s
E2E API Smoke Test / E2E API Smoke Test (push) Successful in 10s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (push) Successful in 13s
status-reaper / reap (push) Successful in 2m32s
CI / Canvas Deploy Reminder (push) Has been cancelled
Handlers Postgres Integration / Handlers Postgres Integration (push) Has been cancelled
Runtime PR-Built Compatibility / PR-built wheel + import smoke (push) Has been cancelled
Continuous synthetic E2E (staging) / Synthetic E2E against staging (push) Successful in 4m50s

This commit is contained in:
devops-engineer 2026-05-14 03:18:29 +00:00
commit 363905d358

View File

@ -90,18 +90,25 @@ jobs:
- id: filter
# Inline replacement for dorny/paths-filter — see e2e-api.yml.
run: |
BASE="${GITHUB_BASE_REF:-${{ github.event.before }}}"
# Gitea Actions evaluates github.event.before to empty string in shell
# scripts. Use GITHUB_EVENT_BEFORE shell env var instead (Gitea
# correctly populates it for push events). PR case uses template var.
BASE=""
if [ "${{ github.event_name }}" = "pull_request" ] && [ -n "${{ github.event.pull_request.base.sha }}" ]; then
BASE="${{ github.event.pull_request.base.sha }}"
elif [ -n "$GITHUB_EVENT_BEFORE" ]; then
BASE="$GITHUB_EVENT_BEFORE"
fi
if [ -z "$BASE" ] || echo "$BASE" | grep -qE '^0+$'; then
echo "handlers=true" >> "$GITHUB_OUTPUT"
exit 0
fi
if ! git cat-file -e "$BASE" 2>/dev/null; then
# timeout 30 guards against the case where BASE points to a ref that
# git can resolve but cat-file hangs (rare on corrupted objects).
if ! timeout 30 git cat-file -e "$BASE" 2>/dev/null; then
git fetch --depth=1 origin "$BASE" 2>/dev/null || true
fi
if ! git cat-file -e "$BASE" 2>/dev/null; then
if ! timeout 30 git cat-file -e "$BASE" 2>/dev/null; then
echo "handlers=true" >> "$GITHUB_OUTPUT"
exit 0
fi