implement-to-pr
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseImplement to PR
从实现到提交PR
- Work out what to build. If you were given a GitHub issue, read it and its comments with . Otherwise, build what we agreed on in this conversation. Don't add anything beyond that.
gh issue view <number> --comments - If you're on the main branch, create a new branch with a short name that describes the work. Leave unrelated local changes alone.
- Build it the way the rest of the codebase does things, and follow the repository's instructions. Add tests for any behavior you change.
- Run the repository's usual checks (formatting, linting, type checks, tests, and build) and read through the whole diff. The work is done when everything the issue or conversation asked for works and every check passes.
- Commit, push, and open a pull request into the main branch. That branch is usually or
main, andmastertells you which. Don't open it as a draft. Give it a title that says what the change does. In the description, say what changed, why, and which checks you ran. If the PR finishes a GitHub issue, addgh repo view --json defaultBranchRef.Closes #<number>
If anything does not work as expected, don't hesitate to ask questions so we can get it working right. That includes an unclear request, a check that fails for a reason you can't find, and code that doesn't behave the way the issue assumes. Ask instead of guessing or working around the problem.
When you're done, share the PR link. Never force-push or merge.
- 明确需要开发的内容。如果收到了GitHub issue,使用 命令查看issue内容及其评论。否则,按照本次对话中约定的内容进行开发。不要额外添加约定之外的任何内容。
gh issue view <number> --comments - 如果你当前位于main分支,请创建一个名称简短且能描述本次工作内容的新分支。不要改动无关的本地变更。
- 遵循代码库的现有实现风格以及仓库的说明要求进行开发。针对所有你修改的行为逻辑,都需要添加对应的测试用例。
- 运行仓库的常规检查(格式化、linting、类型检查、测试、构建),并通读整个diff。当issue或对话中要求的所有功能均正常运行,且所有检查都通过时,工作才算完成。
- 执行commit、push操作,向主分支提交pull request。主分支通常为 或
main,可通过master命令查看具体名称。不要以draft形式提交PR。PR标题需清晰说明变更内容,描述中需说明变更内容、变更原因以及你运行过的检查项。如果该PR完成了某个GitHub issue的需求,请添加gh repo view --json defaultBranchRef。Closes #<number>
如果遇到任何不符合预期的情况,请及时提问,以便我们正确解决问题。包括但不限于需求不明确、检查失败原因无法定位、代码行为与issue描述的预期不符等情况。请务必提问,不要盲目猜测或者强行绕过问题。
完成后,请分享PR链接。严禁执行force-push或merge操作。