From c33339a5fb0401ebb49a2a17115bf0fc4652e542 Mon Sep 17 00:00:00 2001 From: Loki Date: Wed, 15 Jul 2026 02:03:51 +0800 Subject: [PATCH 1/2] fix(ci): use GET for rerun freshness check --- .github/workflows/rerun-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rerun-ci.yml b/.github/workflows/rerun-ci.yml index 1d8938317..ef07c250c 100644 --- a/.github/workflows/rerun-ci.yml +++ b/.github/workflows/rerun-ci.yml @@ -94,7 +94,7 @@ jobs: action="skip" reason="missing head repository metadata" else - latest_head_sha="$(gh api "repos/$HEAD_REPOSITORY/commits" -f sha="$HEAD_BRANCH" -F per_page=1 --jq '.[0].sha' 2>/dev/null || true)" + latest_head_sha="$(gh api --method GET "repos/$HEAD_REPOSITORY/commits" -f sha="$HEAD_BRANCH" -F per_page=1 --jq '.[0].sha')" if [[ -z "$latest_head_sha" || "$latest_head_sha" == "null" ]]; then action="skip" From 60ffcd1199e28dd112f6297caef768dfa8707671 Mon Sep 17 00:00:00 2001 From: Loki Date: Wed, 15 Jul 2026 16:11:55 +0800 Subject: [PATCH 2/2] fix(ci): handle rerun freshness check failures --- .github/workflows/rerun-ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/rerun-ci.yml b/.github/workflows/rerun-ci.yml index ef07c250c..1def66ac5 100644 --- a/.github/workflows/rerun-ci.yml +++ b/.github/workflows/rerun-ci.yml @@ -94,7 +94,9 @@ jobs: action="skip" reason="missing head repository metadata" else - latest_head_sha="$(gh api --method GET "repos/$HEAD_REPOSITORY/commits" -f sha="$HEAD_BRANCH" -F per_page=1 --jq '.[0].sha')" + if ! latest_head_sha="$(gh api --method GET "repos/$HEAD_REPOSITORY/commits" -f sha="$HEAD_BRANCH" -F per_page=1 --jq '.[0].sha')"; then + latest_head_sha="" + fi if [[ -z "$latest_head_sha" || "$latest_head_sha" == "null" ]]; then action="skip"