open PR审查
- 作者仓库星标 184,730
- 作者仓库 AutoGPT
Open a Pull Request
Step 1: Pre-flight checks
Before opening the PR:
- Ensure all changes are committed
- Ensure the branch is pushed to the remote (
git push -u origin <branch>) - Run linters/formatters across the whole repo (not just changed files) and commit any fixes
Step 2: Test coverage
This is critical. Before opening the PR, verify:
Existing behavior is not broken
- Identify which modules/components your changes touch
- Run the existing test suites for those areas
- If tests fail, fix them before opening the PR — do not open a PR with known regressions
New behavior has test coverage
- Every new feature, endpoint, or behavior change needs tests
- If you added a new block, add tests for that block
- If you changed API behavior, add or update API tests
- If you changed frontend behavior, verify it doesn't break existing flows
If you cannot run the full test suite locally, note which tests you ran and which you couldn't in the test plan.
Step 3: Create the PR using the repo template
Read the canonical PR template at .github/PULL_REQUEST_TEMPLATE.md and use it verbatim as your PR body:
- Read the template:
cat .github/PULL_REQUEST_TEMPLATE.md - Preserve the exact section titles and formatting, including:
### Why / What / How### Changes 🏗️### Checklist 📋
- Replace HTML comment prompts (
<!-- ... -->) with actual content; do not leave them in - Do not pre-check boxes — leave all checkboxes as
- [ ]until each step is actually completed - Do not alter the template structure, rename sections, or remove any checklist items
PR title must use conventional commit format (e.g., feat(backend): add new block, fix(frontend): resolve routing bug, dx(skills): update PR workflow). See CLAUDE.md for the full list of scopes.
Use gh pr create with the base branch (defaults to dev if no [base-branch] was provided). Use --body-file to avoid shell interpretation of backticks and special characters:
BASE_BRANCH="${BASE_BRANCH:-dev}"
PR_BODY=$(mktemp)
cat > "$PR_BODY" << 'PREOF'
<filled-in template from .github/PULL_REQUEST_TEMPLATE.md>
PREOF
gh pr create --base "$BASE_BRANCH" --title "<type>(scope): short description" --body-file "$PR_BODY"
rm "$PR_BODY"
Step 4: Review workflow
If you have a workspace that allows testing (docker, running backend, etc.)
- Run
/pr-testto do E2E manual testing of the PR using docker compose, agent-browser, and API calls. This is the most thorough way to validate your changes before review. - After testing, run
/pr-reviewto self-review the PR for correctness, security, code quality, and testing gaps before requesting human review.
If you do NOT have a workspace that allows testing
This is common for agents running in worktrees without a full stack. In this case:
- Run
/pr-reviewlocally to catch obvious issues before pushing - Comment
/reviewon the PR after creating it to trigger the review bot - Poll for the review rather than blindly waiting — check for new review comments every 30 seconds using
gh api repos/Significant-Gravitas/AutoGPT/pulls/{N}/reviews --paginateand the GraphQL inline threads query. The bot typically responds within 30 minutes, but polling lets the agent react as soon as it arrives. - Do NOT proceed or merge until the bot review comes back
- Address any issues the bot raises — use
/pr-addresswhich has a full polling loop with CI + comment tracking
# After creating the PR:
PR_NUMBER=$(gh pr view --json number -q .number)
gh pr comment "$PR_NUMBER" --body "/review"
# Then use /pr-address to poll for and address the review when it arrives
Step 5: Address review feedback
Once the review bot or human reviewers leave comments:
- Run
/pr-addressto address review comments. It will loop until CI is green and all comments are resolved. - Do not merge without human approval.
Related skills
| Skill | When to use |
|---|---|
/pr-test |
E2E testing with docker compose, agent-browser, API calls — use when you have a running workspace |
/pr-review |
Review for correctness, security, code quality — use before requesting human review |
/pr-address |
Address reviewer comments and loop until CI green — use after reviews come in |
Step 6: Post-creation
After the PR is created and review is triggered:
- Share the PR URL with the user
- If waiting on the review bot, let the user know the expected wait time (~30 min)
- Do not merge without human approval
- 流狐分类
- AI 智能
- 作者声明 Agent
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 88 / 100 · 启发式扫描,不代表运行安全
- 作者 / 版本 / 许可
- @Significant-Gravitas · 未声明 license
- 流狐 Token 估算
- 中等消耗
- 流狐接入估算
- 需手动接入
- 是否需要外部 API Key
- 未发现要求
- 检测到的系统要求
- Docker
- 底层运行要求
- Docker
- 检测到的文件与系统行为
-
- 只读
- 允许写入 / 修改
- Shell 执行
- 检测到的网络行为
- 仅限本地
- 安装命令数
- 无(仅作为资料)
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
作者没有在当前 SKILL.md 中定义固定输出样例。 Before opening the PR: Ensure all changes are committed Ensure the branch is pushed to the remote (git push -u origin <branch>)
This is critical. Before opening the PR, verify:
Read the canonical PR template at .github/PULLREQUESTTEMPLATE.md and use it verbatim as your PR body: Read the template: cat .github/PULLREQUESTTEMPLATE.md Preserve the exact section titles and formatting, including:
Step 4: Review workflow
Once the review bot or human reviewers leave comments: Run /pr-address to address review comments. It will loop until CI is green and all comments are resolved. Do not merge without human approval.
# Open a Pull Request
## Step 1: Pre-flight checks
Before opening the PR:
1. Ensure all changes are committed
2. Ensure the branch is pushed to the remote (`git push -u origin <branch>`)
3. Run linters/formatters across the whole repo (not just changed files) and commit any fixes
## Step 2: Test coverage
**This is critical.** Before opening the PR, verify:
### Existing behavior is not broken
- Identify which modules/components your changes touch
- Run the existing test suites for those areas
- If tests fail, fix them before opening the PR — do not open a PR with known regressions
### New behavior has test coverage
- Every new feature, endpoint, or behavior change needs tests
- If you added a new block, add tests for that block
- If you changed API behavior, add or update API tests
- If you changed frontend behavior, verify it doesn't break existing flows
If you cannot run the full test suite locally, note which tests you ran and which you couldn't in the test plan.
## Step 3: Create the PR using the repo template
Read the canonical PR template at `.github/PULL_REQUEST_TEMPLATE.md` and use it **verbatim** as your PR body:
1. Read the template: `cat .github/PULL_REQUEST_TEMPLATE.md`
2. Preserve the exact section titles and formatting, including:
- `### Why / What / How`
- `### Changes 🏗️`
- `### Checklist 📋`
3. Replace HTML comment prompts (`<!-- ... -->`) with actual content; do not leave them in
4. **Do not pre-check boxes** — leave all checkboxes as `- [ ]` until each step is actually completed
5. Do not alter the template structure, rename sections, or remove any checklist items
… 作者原文负责流程事实;流狐只索引当前章节、要点、文件与命令。
章节 -> Step 1: Pre-flight checks → Step 2: Test coverage → Existing behavior is not broken → New behavior has test coverage → Step 3: Create the PR using the repo template → Step 4: Review workflow
要点 -> This is critical. · verbatim · Do not pre-check boxes · PR title must use conventional commit format · Comment /review on the PR · Poll for the review
文件/命令 -> git push -u origin <branch> · .github/PULLREQUESTTEMPLATE.md · cat .github/PULLREQUESTTEMPLATE.md · ### Why / What / How · ### Changes 🏗️ · ### Checklist 📋 · <!-- ... --> · - [ ]
内容 SHA-256 -> 235a84e7a0b6
方法与流程
适用与边界
原文中的明确线索
git push -u origin <branch>、.github/PULLREQUESTTEMPLATE.md、cat .github/PULLREQUESTTEMPLATE.md、### Why / What / How、### Changes 🏗️、### Checklist 📋、<!-- ... -->、- [ ]