pulls.review README

The project's README from github.com/antfu/pulls.review. As one markdown file: README.md.

pulls.review Open Graph image

pulls.review

[!WARNING] Heavily work in progress.

Pull request review made simple. Groups changed files, summarizes what matters, and reviews them one scope at a time.

Use on Website

To use pulls.review on the website, simply visit pulls.review and follow the instructions to connect your GitHub account and start reviewing pull requests directly in your browser.

Use in GitHub

You can optionally install userscript to enhance the GitHub interface with pulls.review features.

Go to pulls.review and scroll down to the GitHub section to install the userscript.

Analyze pull requests from CI (Experimental)

Instead of each reviewer spending their own model key, let a workflow analyze every pull request once and post the result as a PR comment. pulls.review picks the comment up automatically for everyone who opens the PR there. Re-runs on an unchanged PR skip the model call.

# .github/workflows/pulls-review.yml
name: pulls.review
on:
  # The analysis only reads the diff through the API and never checks out PR code,
  # so `pull_request_target` is safe here and lets fork PRs get a comment too.
  pull_request_target:
    types: [opened, synchronize, reopened]

permissions:
  pull-requests: write

jobs:
  analyze:
    runs-on: ubuntu-latest
    steps:
      - uses: antfu/pulls.review@main
        with:
          api-key: ${{ secrets.VERCEL_AI_GATEWAY_API_KEY }}

provider is inferred from the key you pass (gateway for a Vercel AI Gateway token, anthropic, or openai-compatible with base-url); set it explicitly, along with model and locale, when you want to.

The action is a thin wrapper around the @pulls.review/actions CLI, which works anywhere a GitHub token and a model key are in the environment:

GITHUB_TOKEN=... ANTHROPIC_API_KEY=... npx @pulls.review/actions owner/repo#123

Every variable also has a PULLS_REVIEW_* form that takes precedence (PULLS_REVIEW_GITHUB_TOKEN, PULLS_REVIEW_PROVIDER, PULLS_REVIEW_API_KEY, PULLS_REVIEW_MODEL, PULLS_REVIEW_BASE_URL, PULLS_REVIEW_LOCALE); npx @pulls.review/actions --help lists everything.

Packages

Package What it is
packages/app The site at pulls.review and the github.com embed.
@pulls.review/core Fetching, parsing, grouping and summarizing diffs - runs in the browser and in Node.
@pulls.review/actions The CLI the GitHub Action runs.
pulls.review The standalone CLI for reviewing local git changes. Not implemented yet - the name is reserved.

Credits

Inspired heavily by Linear's PR review guides, thanks for the inspiration.

Sponsors

Sponsors

License

MIT License

pulls.review (antfu/pulls.review)

Searching Database…

这是什么?pulls.review 是一个 pull request 评审工具,它按范围对变更文件分组,总结重点内容,让你一次评审一个范围,而不必滚动查看整个 diff。
这是网站、浏览器脚本,还是 CI 工具?实际上三者都是:pulls.review 上的一个网页应用、一个增强 GitHub.com 界面的可选用户脚本,以及一个用于 CI 分析的 GitHub Action;独立的本地 CLI 也在计划中,但尚未实现。
怎么用它开始评审 PR?访问 pulls.review,连接你的 GitHub 账号,然后直接在浏览器中评审 pull request;你也可以从网站的 GitHub 部分安装用户脚本,把这些功能带到 github.com 本身上。
它现在足够稳定、可以放心依赖吗?不行,README 自己就警告它仍处于大量的开发之中,独立的 CLI 包也只是一个预留名称,尚未实现。
GitHub Action 实际上做什么?它运行一个工作流,用你选择的模型对每个 pull request 分析一次,并把结果作为 PR 评论发布,pulls.review 会自动为每个打开该 PR 的评审者读取;对未变更的 PR 重新运行时会跳过模型调用。
这个项目有哪些包?这个仓库是一个 monorepo:packages/app 是 pulls.review 网站和 GitHub 嵌入,@pulls.review/core 负责获取、解析、分组和总结 diff,@pulls.review/actions 是 GitHub Action 所运行的 CLI。
pulls.review 的灵感来自哪里?作者表示它在很大程度上受到 Linear 的 pull request 评审指南的启发。
我可以随意使用任何 AI 提供商吗?可以,它支持 Anthropic、带自定义 base-url 的 OpenAI 兼容端点,或 Vercel AI Gateway 令牌,并且会根据你提供的密钥自动检测提供商。
Creator
antfu
Size
2.5 MB
Stars
546
Age
1mo
Commits · 90 Days