Files
claude-engineering-plugin/plugins/compound-engineering/skills/ce-resolve-pr-feedback/scripts/reply-to-pr-thread
Trevin Chow 5c0ec9137a
Some checks failed
CI / pr-title (push) Has been cancelled
CI / test (push) Has been cancelled
Release PR / release-pr (push) Has been cancelled
Release PR / publish-cli (push) Has been cancelled
refactor(cli)!: rename all skills and agents to consistent ce- prefix (#503)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-18 15:44:22 -07:00

34 lines
749 B
Bash
Executable File

#!/usr/bin/env bash
# Replies to a PR review thread. Body is read from stdin to avoid
# shell escaping issues with markdown (quotes, newlines, etc.).
set -e
if [ $# -lt 1 ]; then
echo "Usage: echo 'reply body' | reply-to-pr-thread THREAD_ID"
echo "Example: echo 'Addressed: added null check' | reply-to-pr-thread PRRT_kwDOABC123"
exit 1
fi
THREAD_ID=$1
BODY=$(cat)
if [ -z "$BODY" ]; then
echo "Error: No body provided on stdin."
exit 1
fi
gh api graphql -f threadId="$THREAD_ID" -f body="$BODY" -f query='
mutation ReplyToReviewThread($threadId: ID!, $body: String!) {
addPullRequestReviewThreadReply(input: {
pullRequestReviewThreadId: $threadId
body: $body
}) {
comment {
id
url
}
}
}'