Merge pull request 'fix: review-pr.sh also needs CI bypass for projects without CI' (#37) from fix/review-pr-ci-bypass into main

Reviewed-on: https://codeberg.org/johba/disinto/pulls/37
This commit is contained in:
johba 2026-03-17 10:10:42 +01:00
commit bff73ebcf7

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
log "SKIP: CI=${CI_STATE}"
exit 0
# 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 ---