Loading...
Loading...
Compare original and translation side by side
writing-leanwriting-leangh pr view --json number,title,body,urlgh pr view --json number,title,body,urlmaingh pr view --json baseRefName,headRefName
git fetch origin --prune
git diff --stat "origin/<baseRefName>...HEAD"git fetch origin --prune
git symbolic-ref refs/remotes/origin/HEAD
git diff --stat "origin/<defaultBranch>...HEAD"maingh pr view --json baseRefName,headRefName
git fetch origin --prune
git diff --stat "origin/<baseRefName>...HEAD"git fetch origin --prune
git symbolic-ref refs/remotes/origin/HEAD
git diff --stat "origin/<defaultBranch>...HEAD"{issue_number}-{description}54-return-to-after-loginundefined{issue_number}-{description}54-return-to-after-loginundefined
If the fetched issue doesn't match the work in the diff, you have resolved the wrong repo — ask
rather than writing a PR body against someone else's issue.
Extract the issue title and body for context.
如果获取到的issue与diff中的工作内容不匹配,说明你找错了仓库——应当询问用户,而不是针对他人的issue编写PR正文。
提取issue的标题和正文作为上下文参考。undefinedundefined
**Required rule:** Before writing/updating the PR body, you must read the diff and extract
**1-3 concrete line-level changes** (e.g., a rename `OldName` -> `NewName`, a new env var key, an endpoint path change).
No speculative bullets.
**必填规则:** 在编写/更新PR正文前,必须阅读diff并提取**1-3项具体的行级变更**(例如,重命名`OldName`为`NewName`、新增环境变量键、端点路径变更)。不得添加推测性的条目。git diff --shortstat <base>...HEADissue-trackerwriting-leanReady for Agentgit diff --shortstat <base>...HEADissue-trackerwriting-leanReady for Agent{issue_number}: {issue_title}54: Return to after loginundefined{issue_number}: {issue_title}54: Return to after loginundefined
**Qualify the reference when the issue is in another repo** — `Closes owner/repo#N`. The qualified
form does close the issue on merge, the same as a same-repo reference; a bare `#N` silently means
this repo's issue N, which is a different issue or none at all.
**如果issue位于其他仓库,必须使用完整引用格式** —— `Closes owner/repo#N`。完整引用格式在PR合并时会自动关闭对应issue,和同仓库引用的效果一致;而仅写`#N`会默认指向当前仓库的第N号issue,可能对应完全不同的issue,甚至不存在。undefinedundefined
**`--base` is not optional.** Without it `gh` targets the repo's default branch, so a slice
stacked on a previous one would show its parent's changes in the diff too — the opposite of the
clean review Step 3b's stacking advice is trying to produce.
**`--base`参数不是可选的。** 如果不加该参数,`gh`会默认指向仓库的默认分支,这样堆叠在前一个PR上的分片PR的diff中会包含父PR的变更——这与步骤3b中堆叠建议想要实现的清晰评审效果完全相反。undefinedundefined
Optionally update the title if needed:
```bash
gh pr edit --title "<issue_number>: <issue_title>"
如有需要,可选择性更新标题:
```bash
gh pr edit --title "<issue_number>: <issue_title>"AGENTS.mdAGENTS.md