fix: review-pr.sh also needs CI bypass for projects without CI

review-poll.sh was fixed but review-pr.sh had its own CI gate that
still blocked. Both checks now skip CI requirement when
WOODPECKER_REPO_ID=0.
This commit is contained in:
openhands 2026-03-17 09:10:06 +00:00
parent cfd4619e81
commit 98a9ada9c3

View file

@ -101,8 +101,13 @@ CI_STATE=$(curl -sf -H "Authorization: token ${CODEBERG_TOKEN}" \
"${API_BASE}/commits/${PR_SHA}/status" | jq -r '.state // "unknown"')
if [ "$CI_STATE" != "success" ]; then
# Projects without CI (woodpecker_repo_id=0) treat empty/pending as pass
if [ "${WOODPECKER_REPO_ID:-2}" = "0" ] && { [ -z "$CI_STATE" ] || [ "$CI_STATE" = "pending" ] || [ "$CI_STATE" = "unknown" ]; }; then
log "no CI configured, proceeding without CI gate"
else
log "SKIP: CI=${CI_STATE}"
exit 0
fi
fi
# --- Check for existing reviews ---