yeet
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePrerequisites
前提条件
- Require GitHub CLI . Check
gh. If missing, ask the user to installgh --versionand stop.gh - Require authenticated session. Run
gh. If not authenticated, ask the user to rungh auth status(and re-rungh auth login) before continuing.gh auth status
- 需要安装GitHub CLI 。执行
gh检查是否已安装。如果未安装,请让用户安装gh --version并终止操作。gh - 需要已通过身份验证的会话。执行
gh检查。如果未通过身份验证,请让用户先执行gh auth status(并重新运行gh auth login),然后再继续。gh auth status
Naming conventions
命名规范
- Branch: when starting from main/master/default.
codex/{description} - Commit: (terse).
{description} - PR title: summarizing the full diff.
[codex] {description}
- 分支:从main/master/default分支开始时,命名为。
codex/{description} - 提交信息:(简洁表述)。
{description} - PR标题:,需概括完整的代码变更内容。
[codex] {description}
Workflow
工作流程
- If on main/master/default, create a branch:
git checkout -b "codex/{description}" - Otherwise stay on the current branch.
- Confirm status, then stage everything: then
git status -sb.git add -A - Commit tersely with the description:
git commit -m "{description}" - Run checks if not already. If checks fail due to missing deps/tools, install dependencies and rerun once.
- Push with tracking:
git push -u origin $(git branch --show-current) - If git push fails due to workflow auth errors, pull from master and retry the push.
- Open a PR and edit title/body to reflect the description and the deltas:
GH_PROMPT_DISABLED=1 GIT_TERMINAL_PROMPT=0 gh pr create --draft --fill --head $(git branch --show-current) - Write the PR description to a temp file with real newlines (e.g. pr-body.md ... EOF) and run pr-body.md to avoid \n-escaped markdown.
- PR description (markdown) must be detailed prose covering the issue, the cause and effect on users, the root cause, the fix, and any tests or checks used to validate.
- 如果当前处于main/master/default分支,请创建新分支:
git checkout -b "codex/{description}" - 否则保留在当前分支。
- 确认状态,然后暂存所有文件:先执行,再执行
git status -sb。git add -A - 使用简洁描述提交:
git commit -m "{description}" - 如果尚未运行检查,则执行检查。如果因缺少依赖/工具导致检查失败,请安装依赖并重试一次。
- 推送并设置跟踪:
git push -u origin $(git branch --show-current) - 如果因工作流身份验证错误导致git推送失败,请从master分支拉取代码并重试推送。
- 打开PR并编辑标题/正文以体现描述和代码变更:
GH_PROMPT_DISABLED=1 GIT_TERMINAL_PROMPT=0 gh pr create --draft --fill --head $(git branch --show-current) - 将PR描述写入临时文件并保留真实换行(例如pr-body.md ... EOF),通过运行pr-body.md来避免使用\n转义的Markdown格式。
- PR描述(Markdown格式)必须包含详细内容,涵盖问题、对用户的影响、根本原因、修复方案,以及用于验证的任何测试或检查。