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:
parent
cfd4619e81
commit
98a9ada9c3
1 changed files with 7 additions and 2 deletions
|
|
@ -101,8 +101,13 @@ CI_STATE=$(curl -sf -H "Authorization: token ${CODEBERG_TOKEN}" \
|
||||||
"${API_BASE}/commits/${PR_SHA}/status" | jq -r '.state // "unknown"')
|
"${API_BASE}/commits/${PR_SHA}/status" | jq -r '.state // "unknown"')
|
||||||
|
|
||||||
if [ "$CI_STATE" != "success" ]; then
|
if [ "$CI_STATE" != "success" ]; then
|
||||||
log "SKIP: CI=${CI_STATE}"
|
# Projects without CI (woodpecker_repo_id=0) treat empty/pending as pass
|
||||||
exit 0
|
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
|
fi
|
||||||
|
|
||||||
# --- Check for existing reviews ---
|
# --- Check for existing reviews ---
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue