diff --git a/.gitea/workflows/scripts/publish.sh b/.gitea/workflows/scripts/publish.sh index 6a88888..8c9bc9b 100755 --- a/.gitea/workflows/scripts/publish.sh +++ b/.gitea/workflows/scripts/publish.sh @@ -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:]')