finish-pr

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Finish PR

Finish PR

Quick Start

快速开始

When local work is complete, follow workflows/ready-for-merge.md.
Example: on branch
42-let-agents-use-github-more-ergonomically
, infer issue
#42
, verify the diff, commit as
feat: #42 ...
, push, and create or update the ready-for-review PR.
This skill verifies, commits, pushes, creates or reuses a ready-for-review pull request, then loops through checks and PR feedback until the PR is ready-to-merge or human input is required. It never merges the PR.
当本地工作完成后,请遵循workflows/ready-for-merge.md的指引。
示例:在分支
42-let-agents-use-github-more-ergonomically
上,推断对应的issue为
#42
,验证代码差异,按照
feat: #42 ...
的格式提交代码,推送分支,并创建或更新待审核的PR。
该Skill会验证代码、提交、推送、创建或复用待审核的拉取请求,然后循环检查PR的各项校验和反馈,直到PR准备好合并或需要人工输入为止。它不会自动合并PR。

Workflow

工作流程

  1. Read repository guidance, commit rules, and the PR template.
  2. Infer the issue from the current branch or existing PR metadata; ask if ambiguous.
  3. Inspect uncommitted changes and stage only relevant paths.
  4. Run the repository's documented verification commands.
  5. Commit using the repository's required commit format.
  6. Push the branch when there is work to publish.
  7. Create or update a ready-for-review PR using the repository template.
  8. Enter the readiness loop: watch all checks, triage every problematic check and PR feedback item, fix branch-local issues, push, and repeat.
  9. Mark draft PRs ready when the loop reaches the ready state.
  10. Report ready-to-merge status without merging.
  1. 阅读仓库指引、提交规则和PR模板。
  2. 从当前分支或现有PR元数据中推断对应的issue;若存在歧义则询问用户。
  3. 检查未提交的更改,仅暂存相关路径的内容。
  4. 运行仓库中已记录的验证命令。
  5. 按照仓库要求的提交格式提交代码。
  6. 当有需要发布的工作内容时推送分支。
  7. 使用仓库模板创建或更新待审核的PR。
  8. 进入就绪循环:监控所有校验项,分类处理每个有问题的校验和PR反馈项,修复分支本地的问题,推送更改,重复此过程。
  9. 当循环达到就绪状态时,将草稿PR标记为待审核状态。
  10. 报告PR已准备好合并的状态,但不执行合并操作。

Guardrails

防护规则

  • Do not rewrite branch history or force-push by default.
  • Do not create follow-up issues from PR feedback.
  • Do not wait indefinitely for new human review comments.
  • Do not use fail-fast or required-check-only watching by default.
  • Do not add AI or agent attribution unless the repository requires it.
  • Stop for secrets, permissions, product decisions, or ambiguous scope.
  • 默认情况下,不要重写分支历史或强制推送。
  • 不要从PR反馈中创建后续issue。
  • 不要无限期等待新的人工评审评论。
  • 默认情况下,不要使用快速失败或仅监控必填校验项的模式。
  • 除非仓库要求,否则不要添加AI或Agent的署名。
  • 若遇到密钥、权限、产品决策或范围不明确的情况,停止操作。