| name | pr-review |
| description | Automated pull request review — fetch diffs, run checks, post structured comments, enforce quality gates. |
PR Review
Automated PR review workflow. Fetches diffs, runs quality checks, posts structured comments.
Fetch PR Details
gh pr view 142 --json title,body,state,author,additions,deletions,files
gh pr diff 142 > pr-142.diff
gh pr diff 142 --name-only
gh pr view 142 --json commits --jq '.commits[].message'
Run Checks on PR
npx tsc --noEmit --strict $(gh pr diff 142 --name-only | grep '\.ts$')
npx eslint $(gh pr diff 142 --name-only | grep -E '\.(ts|tsx|js|jsx)$')
npx vitest run --changed $(gh pr diff 142 --name-only)
Post Review Comment
gh pr comment 142 --body "
## Review Summary
### Changes
- Files: \`$(gh pr diff 142 --name-only | wc -l)\`
- Additions: +$(gh pr view 142 --json additions --jq '.[].additions')
- Deletions: -$(gh pr view 142 --json deletions --jq '.[].deletions')
### Quality Gate
| Check | Status |
|-------|--------|
| TypeScript | PASS |
| ESLint | PASS |
| Tests | PASS |
| Secrets scan | PASS |
### Feedback
- [Minor] Consider extracting the type guard in \`auth.ts:42\`
- [Suggestion] Add JSDoc to \`validateToken()\`
**LGTM** — ready to merge
"
Auto-Assign Reviewers
gh api repos/{owner}/{repo}/pulls/142/requested_reviewers \
-X POST \
-f reviewers='["username"]'
Merge Strategy
gh pr merge 142 --squash --delete-branch
gh pr merge 142 --admin --delete-branch
gh pr merge 142 --rebase --delete-branch
PR Templates
Add .github/pull_request_template.md:
## What does this PR do?
<!-- Describe your changes -->
## Testing
- [ ] Unit tests added/updated
- [ ] Tested locally
- [ ] Works on staging (if applicable)
## Checklist
- [ ] Commits follow conventional commits
- [ ] No console.log/debugger left
- [ ] Types are correct
- [ ] Documentation updated (if needed)
## Related Issues
Closes #
See Also
github-actions skill — CI/CD checks
guardian skill — security scanning
code-review-graph skill — blast-radius analysis
- PR Review Pipeline workflow