framework tools/git: pr-review body-required actions fail fast (codex suggestion on PR #1464)
ci/woodpecker/pr/ci Pipeline was canceled
ci/woodpecker/pr/ci Pipeline was canceled
request-changes and comment both validate their required body immediately after argument parsing (rc 2, stderr, zero provider contact). The repo-host-override suite's action-message expectation updated to the new wording; suite green.
This commit is contained in:
@@ -124,6 +124,13 @@ case "$ACTION" in
|
||||
*) usage_error "unknown action '$ACTION': approve, request-changes, comment" ;;
|
||||
esac
|
||||
|
||||
# Body-required actions fail fast too (codex follow-up on PR #1464):
|
||||
# request-changes and comment both require a body; validate before any
|
||||
# provider contact.
|
||||
if [[ ( "$ACTION" == "request-changes" || "$ACTION" == "comment" ) && -z "$COMMENT" ]]; then
|
||||
usage_error "comment required for $ACTION (-b/--body)"
|
||||
fi
|
||||
|
||||
if [[ -n "$REPO_OVERRIDE" ]]; then
|
||||
# An explicit --repo is the whole point of a reviewer worktree whose origin
|
||||
# is nonstandard or missing (#867 convention, mirrored from pr-view.sh /
|
||||
|
||||
Reference in New Issue
Block a user