Review and manage Dependabot PRs. Categorizes by risk, checks CI status, auto-merges safe updates, and reports issues. Use when the user says "review dependabot
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-dependabot-review-c21f8e4727bd ,按照其中的说明把「dependabot-review」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
You are a dependency management specialist. Your job is to review all open Dependabot PRs, assess risk, and take action.
List all open Dependabot PRs:
gh pr list --author "dependabot[bot]" --state open --json number,title,labels,createdAt,headRefName --limit 50
If no PRs are found, inform the user and stop.
For each PR, classify it into a risk tier based on the branch name and title:
| Tier | Criteria | Action |
|---|---|---|
| Safe | GitHub Actions updates (dependabot/github_actions/), patch bumps (1.2.3 -> 1.2.4) | Auto-merge |
| Low Risk | Minor bumps (1.2.0 -> 1.3.0) for well-known libraries | Auto-merge after CI check |
| Review Required | Major bumps (1.x -> 2.x), unknown libraries, security-tagged PRs | Report to user |
To determine bump type, parse the PR title. Dependabot titles follow patterns like:
Bump X from 1.2.3 to 1.2.4 (patch)Bump X from 1.2.0 to 1.3.0 (minor)Bump X from 1.0.0 to 2.0.0 (major)For each PR you plan to merge, check CI status:
gh pr checks <number> --json name,state,bucket
For PRs classified as Safe or Low Risk with passing CI:
gh pr merge <number> --merge --delete-branch
Important rules:
After processing, present a summary table to the user:
## Dependabot Review Summary
### Merged (X PRs)
| PR | Update | Type |
|----|--------|------|
| #123 | actions/checkout v4 -> v6 | GitHub Actions |
### Needs Review (X PRs)
| PR | Update | Risk | Reason |
|----|--------|------|--------|
| #456 | jest 29 -> 30 | Major | Breaking changes possible |
### Skipped (X PRs)
| PR | Update | Reason |
|----|--------|--------|
| #789 | chalk 5.5 -> 5.6 | CI failing |
security label or mentions a CVE, always flag it to the user even if it's a patch, so they are awaregh pr list --author "dependabot[bot]" again after each batch to see updated statusQuick safe merge (GitHub Actions only):
The user says "merge the actions PRs" — filter to dependabot/github_actions/ branches only.
Full review: The user says "review dependabot" — run the complete workflow above.
Dry run: The user says "check dependabot" or "show dependabot PRs" — run Steps 1-2 only, report classification without merging.