← 返回 Skills 市场
terrycarter1985

PR Auto-Review

作者 terrycarter1985 · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
73
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install 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...
使用说明 (SKILL.md)

PR Auto-Review

Automated pipeline that runs when a new PR is submitted:

  1. Code Review — fetch PR diff, check CI/CD status, scan for secrets, list changed files
  2. Health Check — verify service availability (uses healthcheck skill if present, falls back to curl probes)
  3. 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 gh CLI
  • 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 healthcheck skill is installed, runs healthcheck.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

  • gh CLI (authenticated) — for PR data
  • git — for branch diffs
  • curl — for health probes and Discord webhook
  • jq — 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
安全使用建议
Before installing or running, make sure gh is authenticated to the intended repository, provide only a trusted Discord webhook, review the report content that may be posted, and only enable cron or the optional healthcheck integration if you want recurring automated checks.
功能分析
Type: OpenClaw Skill Name: pr-auto-review Version: 1.0.0 The skill bundle implements a standard PR review pipeline using the GitHub CLI and Discord webhooks. It includes features for diff analysis, secret scanning, and local service health checks (e.g., Nginx, Ollama) as described in SKILL.md. The implementation in scripts/pr-auto-review.sh is functional and lacks any indicators of malicious intent, data exfiltration, or obfuscation.
能力标签
requires-walletrequires-sensitive-credentials
能力评估
Purpose & Capability
The SKILL.md and script align: they review a PR or branch diff, check CI status, scan for obvious secret patterns, run service health checks, and optionally send a Discord summary.
Instruction Scope
The main examples are user-invoked, while cron and webhook triggering are documented as optional integrations rather than installed automatically.
Install Mechanism
There is no install spec and metadata lists no required binaries, although the documentation and script rely on gh, git, curl, jq, and optionally another installed healthcheck skill.
Credentials
Authenticated GitHub access, localhost health probes, and outbound Discord posting are proportionate to the stated PR-review and notification workflow.
Persistence & Privilege
No persistence is created by the script itself, but SKILL.md includes an optional OpenClaw cron example for repeated PR polling.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install pr-auto-review
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /pr-auto-review 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release: automated PR review pipeline with code review, health check, and Discord notification
元数据
Slug pr-auto-review
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

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。

💬 留言讨论