From 51d2b81ef4b4eef3909aa051fecc13055cf2f8bc Mon Sep 17 00:00:00 2001 From: openhands Date: Tue, 17 Mar 2026 09:05:43 +0000 Subject: [PATCH] fix: review-poll skips PRs when project has no CI Projects with woodpecker_repo_id=0 (like disinto) have no CI status. Review-poll treated empty CI state as failure and skipped all PRs. Now treats empty/pending CI as pass when no CI is configured. --- review/review-poll.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/review/review-poll.sh b/review/review-poll.sh index 71b4d8c..a586b30 100755 --- a/review/review-poll.sh +++ b/review/review-poll.sh @@ -56,10 +56,16 @@ while IFS= read -r line; do CI_STATE=$(curl -sf -H "Authorization: token ${CODEBERG_TOKEN}" \ "${API_BASE}/commits/${PR_SHA}/status" | jq -r '.state // "unknown"') + # Skip if CI is running/failed. Allow "success" or no CI configured (empty/pending with no pipelines) if [ "$CI_STATE" != "success" ]; then - log " #${PR_NUM} CI=${CI_STATE}, skip" - SKIPPED=$((SKIPPED + 1)) - continue + # Projects without CI (woodpecker_repo_id=0) treat empty/pending as pass + if [ "${WOODPECKER_REPO_ID:-2}" = "0" ] && [ "$CI_STATE" = "" ] || [ "$CI_STATE" = "pending" ]; then + : # no CI configured, proceed to review + else + log " #${PR_NUM} CI=${CI_STATE}, skip" + SKIPPED=$((SKIPPED + 1)) + continue + fi fi # Check formal Codeberg reviews (not comment markers)