PR Auto-Review
/install pr-auto-review
PR Auto-Review
Automated pipeline that runs when a new PR is submitted:
- Code Review — fetch PR diff, check CI/CD status, scan for secrets, list changed files
- Health Check — verify service availability (uses healthcheck skill if present, falls back to curl probes)
- Discord Notification — post structured results to a team channel
Quick Start
# Review a GitHub PR and notify Discord
bash scripts/pr-auto-review.sh \
--pr-url https://github.com/org/repo/pull/123 \
--discord-webhook https://discord.com/api/webhooks/.../...
# Review a branch diff
bash scripts/pr-auto-review.sh \
--branch feature/new-api \
--discord-webhook https://discord.com/api/webhooks/.../...
# Review last commit, skip health check
bash scripts/pr-auto-review.sh --skip-healthcheck
# Save report to file
bash scripts/pr-auto-review.sh --pr-url ... --report ./review-report.md
Options
| Flag | Description |
|---|---|
--pr-url \x3Curl> |
GitHub PR URL (extracts PR number automatically) |
--branch \x3Cname> |
Branch to diff against main/master |
--discord-webhook \x3Curl> |
Discord webhook URL for notification |
--skip-healthcheck |
Skip service health probes |
--report \x3Cpath> |
Save markdown report to file |
Pipeline Steps
1. Code Review
- Fetches PR diff via
ghCLI - Reports PR title, author, changed files
- Checks CI/CD status (
gh pr checks) - Scans diff for potential hardcoded secrets (password, token, api_key patterns)
2. Service Health Check
- If the
healthcheckskill is installed, runshealthcheck.sh --json - Otherwise, probes common local services via curl (nginx, api, ollama)
- Reports status per service: ✅ OK / 🟡 Degraded / 🔴 Down
3. Discord Notification
- Posts the report summary to the configured webhook
- Content truncated to 2000 chars (Discord limit)
- For richer embeds, see references/discord-formats.md
Dependencies
ghCLI (authenticated) — for PR datagit— for branch diffscurl— for health probes and Discord webhookjq— for JSON payload construction
Integration with Cron
Set up automatic PR review on a schedule:
# Example: check open PRs every 30 minutes
openclaw cron add --name "pr-review-poll" --every 30m \
--message "Run pr-auto-review on any new open PRs and notify Discord"
Integration with GitHub Webhooks
For real-time triggering, configure a GitHub webhook to call an endpoint that invokes this skill. The pipeline script accepts --pr-url to target the specific PR.
Output
The script outputs a markdown report to stdout and optionally saves it to a file. The report includes:
- PR metadata (title, author, files)
- CI/CD status summary
- Security scan results
- Service health status
- Actionable summary
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install pr-auto-review - 安装完成后,直接呼叫该 Skill 的名称或使用
/pr-auto-review触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
PR Auto-Review 是什么?
Automated PR review pipeline: code review + service health check + Discord notification. Trigger when a new PR is submitted or when running post-merge valida... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 73 次。
如何安装 PR Auto-Review?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install pr-auto-review」即可一键安装,无需额外配置。
PR Auto-Review 是免费的吗?
是的,PR Auto-Review 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
PR Auto-Review 支持哪些平台?
PR Auto-Review 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 PR Auto-Review?
由 terrycarter1985(@terrycarter1985)开发并维护,当前版本 v1.0.0。