From 9f4692347f8c247e37a9c2a73815bd2bae2deeb8 Mon Sep 17 00:00:00 2001 From: mkorwel Date: Tue, 10 Mar 2026 13:41:20 -0700 Subject: [PATCH] fix(skills): handle pending CI checks in async pr review test step --- .gemini/skills/async-pr-review/scripts/async-review.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.gemini/skills/async-pr-review/scripts/async-review.sh b/.gemini/skills/async-pr-review/scripts/async-review.sh index d7b673b103..3fd35f3182 100755 --- a/.gemini/skills/async-pr-review/scripts/async-review.sh +++ b/.gemini/skills/async-pr-review/scripts/async-review.sh @@ -86,11 +86,17 @@ rm -f "$log_dir/npm-test.exit" { while [ ! -f "$log_dir/build-and-lint.exit" ]; do sleep 1; done if [ "$(cat "$log_dir/build-and-lint.exit")" == "0" ]; then - if gh pr checks "$pr_number" > "$log_dir/ci-checks.log" 2>&1; then + gh pr checks "$pr_number" > "$log_dir/ci-checks.log" 2>&1 + ci_status=$? + + if [ "$ci_status" -eq 0 ]; then echo "CI checks passed. Skipping local npm tests." > "$log_dir/npm-test.log" echo 0 > "$log_dir/npm-test.exit" + elif [ "$ci_status" -eq 8 ]; then + echo "CI checks are still pending. Skipping local npm tests to avoid duplicate work. Please check GitHub for final results." > "$log_dir/npm-test.log" + echo 0 > "$log_dir/npm-test.exit" else - echo "CI checks did not pass. Failing checks:" > "$log_dir/npm-test.log" + echo "CI checks failed. Failing checks:" > "$log_dir/npm-test.log" gh pr checks "$pr_number" --json name,bucket -q '.[] | select(.bucket=="fail") | .name' >> "$log_dir/npm-test.log" 2>&1 echo "Attempting to extract failing test files from CI logs..." >> "$log_dir/npm-test.log"