plugins/claude/review/scripts/post-pr-create.sh
Snider b633ae81f6 feat: add README and flesh out all plugins
README.md:
- GitHub-friendly documentation
- Installation instructions
- Plugin overview with commands

review plugin:
- /review:security - Security-focused review
- /review:pr - PR review
- hooks.json - Post PR create suggestion
- scripts/post-pr-create.sh

verify plugin:
- /verify:ready - Quick readiness check
- /verify:tests - Test verification
- hooks.json - Pre-push warning
- scripts/pre-push-check.sh

qa plugin:
- /qa:check - Report only, no fixes
- /qa:lint - Lint with fix option
- hooks.json - QA output filtering

ci plugin:
- /ci:status - CI status display
- /ci:run - Trigger workflows
- /ci:fix - Analyse and fix failures
- hooks.json - Post-push CI hint
- scripts/post-push-ci.sh

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 19:48:51 +00:00

22 lines
581 B
Bash
Executable file

#!/bin/bash
# Suggest review after PR creation
read -r input
OUTPUT=$(echo "$input" | jq -r '.tool_response.stdout // .tool_response.output // empty')
# Extract PR URL from output
PR_URL=$(echo "$OUTPUT" | grep -oE 'https://github.com/[^/]+/[^/]+/pull/[0-9]+' | head -1)
if [ -n "$PR_URL" ]; then
PR_NUM=$(echo "$PR_URL" | grep -oE '[0-9]+$')
cat << EOF
{
"hookSpecificOutput": {
"hookEventName": "PostToolUse",
"additionalContext": "PR created: $PR_URL\n\nRun \`/review:pr $PR_NUM\` to review before requesting reviewers."
}
}
EOF
else
echo "$input"
fi