Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

How to gate AI agent pull requests on GitHub (without reading every line)

说明与用途

通过配置 MergeJudge,AI 代理的拉取请求会自动被划分为 auto、review 或 block 三个通道,确保基分支的规则不会被代理削弱。

问题

Coding agents create many pull requests that humans cannot review line by line, leading to noisy comments and potential rule bypass.

结果

The setup ensures AI-generated PRs are automatically classified into lanes, with protected paths always requiring human review, and prevents agents from weakening rules.

工作流

  • 1. Install MergeJudge GitHub App or set up self-hosted GitHub Action.
  • 2. Add provider key as a repo secret (e.g., AI_API_KEY).
  • 3. Create .github/workflows/mergejudge.yml with permissions and runner configuration.
  • 4. Define protected paths in .mergejudge.yml on the default branch.
  • 5. Add judgement rules in AGENTS.md under a "## Code review" section.
  • 6. Open a PR; MergeJudge adds a sticky summary comment, a mergejudge/lane check, and inline comments.
  • 7. Review outcome: auto (success), review (neutral), or block (failure).

证据

Deterministic rules put every PR in a lane: auto (low risk), review (a human must look) or block.

来源

An AI model reads the diff and adds line comments, but can only make the lane stricter, never looser.

来源

The rules and policy are read from the base branch, never from the PR branch.

来源

Protected paths always land in at least review, with or without an AI provider.

来源

  • 记录日期: 2026-10-24T10:26:08.483Z