fix: PRIORITY 1.5 misses REQUEST_CHANGES when CI is not yet settled (#41)
This commit is contained in:
parent
2544fc49fb
commit
34ddbef3fd
1 changed files with 5 additions and 1 deletions
|
|
@ -356,7 +356,11 @@ for i in $(seq 0 $(($(echo "$OPEN_PRS" | jq 'length') - 1))); do
|
|||
fi
|
||||
|
||||
# Stuck: REQUEST_CHANGES or CI failure → spawn agent
|
||||
if ci_passed "$CI_STATE" && [ "${HAS_CHANGES:-0}" -gt 0 ]; then
|
||||
# Do NOT gate REQUEST_CHANGES on ci_passed: if a reviewer leaves REQUEST_CHANGES
|
||||
# while CI is still pending/unknown, we must act immediately rather than wait for
|
||||
# CI to settle. Definitive CI failure (non-pending, non-unknown) is handled by
|
||||
# the elif below, so we only spawn here when CI has not definitively failed.
|
||||
if [ "${HAS_CHANGES:-0}" -gt 0 ] && { ci_passed "$CI_STATE" || [ "$CI_STATE" = "pending" ] || [ "$CI_STATE" = "unknown" ] || [ -z "$CI_STATE" ]; }; then
|
||||
log "PR #${PR_NUM} (issue #${STUCK_ISSUE}) has REQUEST_CHANGES — fixing first"
|
||||
nohup "${SCRIPT_DIR}/dev-agent.sh" "$STUCK_ISSUE" >> "$LOGFILE" 2>&1 &
|
||||
log "started dev-agent PID $! for stuck PR #${PR_NUM}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue