From ec4025dccc708b9f815f42f1d233adbc22da6715 Mon Sep 17 00:00:00 2001 From: daharoni Date: Wed, 8 Apr 2026 00:35:16 -0700 Subject: [PATCH] Re-trigger CI checks after key normalization commit When CI normalizes keys and pushes a new commit, the GITHUB_TOKEN push doesn't trigger a new workflow run. This adds a step to re-request the check suite on the new commit via the GitHub API, so branch protection sees a passing check on the PR head. Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/workflows/sync-to-wiki.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/sync-to-wiki.yml b/.github/workflows/sync-to-wiki.yml index eca7cce..e858af5 100644 --- a/.github/workflows/sync-to-wiki.yml +++ b/.github/workflows/sync-to-wiki.yml @@ -56,6 +56,23 @@ jobs: git commit -m "Normalize citation keys" git push + - name: Re-trigger checks on new commit + if: steps.normalize.outputs.changed == 'true' && steps.commit.outcome == 'success' && github.event_name == 'pull_request' + env: + GH_TOKEN: ${{ github.token }} + run: | + NEW_SHA=$(git rev-parse HEAD) + gh api "repos/${{ github.repository }}/check-runs" \ + -f name="validate" \ + -f head_sha="$NEW_SHA" \ + -f status="queued" \ + -f output='{"title":"Re-running after key normalization","summary":"Keys were normalized, re-triggering validation."}' || true + # Also request check suite to re-run + SUITE_IDS=$(gh api "repos/${{ github.repository }}/commits/${NEW_SHA}/check-suites" --jq '.check_suites[].id' 2>/dev/null || true) + for SID in $SUITE_IDS; do + gh api -X POST "repos/${{ github.repository }}/check-suites/${SID}/rerequest" 2>/dev/null || true + done + - name: Warn about non-standard keys if: steps.normalize.outputs.changed == 'true' && steps.commit.outcome == 'failure' run: |