fix: review-pr.sh exits after REQUEST_CHANGES — should wait for new commits and re-review (#300)
After REQUEST_CHANGES/DISCUSS, review-pr.sh now writes PHASE:awaiting_changes (with the reviewed SHA) instead of PHASE:review_complete. review-poll.sh gains a re-review section that detects awaiting_changes sessions with new commits and CI passing, then re-invokes review-pr.sh in the same tmux session. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
62d8c81069
commit
b5c854c7a7
2 changed files with 65 additions and 0 deletions
|
|
@ -871,3 +871,19 @@ if [ -n "$EVENT_ID" ]; then
|
|||
fi
|
||||
|
||||
log "DONE: ${VERDICT} (re-review: ${IS_RE_REVIEW})"
|
||||
|
||||
# --- Write phase based on verdict ---
|
||||
# Claude wrote PHASE:review_complete to signal JSON is ready; now overwrite
|
||||
# with the correct lifecycle phase so review-poll.sh knows what to do next.
|
||||
case "$VERDICT" in
|
||||
APPROVE)
|
||||
echo "PHASE:review_complete" > "${PHASE_FILE}"
|
||||
;;
|
||||
REQUEST_CHANGES|DISCUSS)
|
||||
printf 'PHASE:awaiting_changes\nSHA:%s\n' "$PR_SHA" > "${PHASE_FILE}"
|
||||
log "awaiting new commits (PHASE:awaiting_changes)"
|
||||
;;
|
||||
*)
|
||||
echo "PHASE:review_complete" > "${PHASE_FILE}"
|
||||
;;
|
||||
esac
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue