fix: dev-agent CI wait loop blocks forever for projects without CI
The wait-for-CI loop sleeps 30s × 60 iterations waiting for CI to report. Projects with WOODPECKER_REPO_ID=0 never get a status, so the agent times out after 30min without merging approved PRs. Now detects no-CI early and treats as success immediately.
This commit is contained in:
parent
531ae5cf71
commit
8c816d6e7b
1 changed files with 9 additions and 0 deletions
|
|
@ -1069,6 +1069,15 @@ while [ "$REVIEW_ROUND" -lt "$MAX_REVIEW_ROUNDS" ]; do
|
|||
CI_STATE=$(curl -sf -H "Authorization: token ${CODEBERG_TOKEN}" \
|
||||
"${API}/commits/${CURRENT_SHA}/status" | jq -r '.state // "unknown"')
|
||||
|
||||
# No CI configured — treat as success immediately
|
||||
if [ "${WOODPECKER_REPO_ID:-2}" = "0" ] && { [ -z "$CI_STATE" ] || [ "$CI_STATE" = "pending" ] || [ "$CI_STATE" = "unknown" ]; }; then
|
||||
log "no CI configured — skipping CI wait"
|
||||
CI_STATE="success"
|
||||
CI_DONE=true
|
||||
CI_FIX_COUNT=0
|
||||
break
|
||||
fi
|
||||
|
||||
if [ "$CI_STATE" = "success" ] || [ "$CI_STATE" = "failure" ] || [ "$CI_STATE" = "error" ]; then
|
||||
log "CI: ${CI_STATE}"
|
||||
CI_DONE=true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue