publish: qa approval detail on the PR, terse verdict on the issue #88

Merged
ffaerber merged 1 commits from fix/qa-verdict-terse into main 2026-07-06 10:10:51 +02:00
Showing only changes of commit e22a4cf98c - Show all commits
+9 -3
View File
@@ -102,12 +102,18 @@ if [ "$MODE" != "pr" ]; then
git clean -fd 2>/dev/null || true
# ---------- @qa: reviewer only — never edits, never merges ----------
# Recommendations land ON THE PR (onsite the diff); the pass/fail verdict lands ON THE ISSUE so
# @pm (who never reads the PR) can act on it. Ends its reply with APPROVE / BOUNCE: @dev / HALT.
# ALL technical review detail lands ON THE PR (onsite the diff); the ISSUE gets only the terse
# pass/fail verdict so @pm (who never reads the PR) can act on it and the issue thread — which is
# for the creator/orchestration — stays free of review internals. APPROVE / BOUNCE: @dev / HALT.
if [ "$NAME" = "qa" ]; then
PRN=$(resolve_pr)
if grep -qiE '^[[:space:]]*APPROVE[[:space:]]*$' /tmp/agent_out.md; then
post_to "$ISSN" "$(printf '✅ Reviewed PR #%s — looks good.\n\n%s%s' "${PRN:-?}" "$reply" "$activity")"
if [ -n "$PRN" ]; then
post_to "$PRN" "$reply$activity" # the review detail belongs on the PR
post_to "$ISSN" "✅ Reviewed PR #$PRN — looks good."
else # no PR resolved — nowhere better than the issue
post_to "$ISSN" "$(printf '✅ Reviewed — looks good.\n\n%s%s' "$reply" "$activity")"
fi
trig "$ISSN" "@pm — I have reviewed and approved PR #${PRN:-?} (issue #$ISSN). Over to you."
elif grep -qiE '^[[:space:]]*BOUNCE:[[:space:]]*@(junior|senior|lead|intern)' /tmp/agent_out.md; then
dev=$(grep -oiE 'BOUNCE:[[:space:]]*@(junior|senior|lead|intern)' /tmp/agent_out.md | head -1 | grep -oiE '(junior|senior|lead|intern)' | tr '[:upper:]' '[:lower:]')