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:
commit
bff73ebcf7
1 changed files with 7 additions and 2 deletions
|
|
@ -101,9 +101,14 @@ 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
|
||||||
|
# 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}"
|
log "SKIP: CI=${CI_STATE}"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# --- Check for existing reviews ---
|
# --- Check for existing reviews ---
|
||||||
status "checking existing reviews"
|
status "checking existing reviews"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue