create-pr
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCreate a PR
创建PR
Goal
目标
Produce a PR that’s easy to review and safe to merge:
- small, scoped changes
- green checks (lint/tests/build as appropriate)
- clear description + validation steps
生成易于评审且可安全合并的PR:
- 小型、范围明确的变更
- 检查全部通过(根据情况完成lint/测试/构建)
- 清晰的描述 + 验证步骤
Workflow (checklist)
工作流(检查清单)
- Confirm scope
- Restate the goal and acceptance criteria.
- Identify files likely to change; avoid unrelated cleanup.
- Create a branch
- Use a descriptive name: ,
fix/<topic>,feat/<topic>.chore/<topic>
- Use a descriptive name:
- Implement changes
- Keep diffs focused; prefer small commits.
- Run quality gates
- Run the repo’s standard commands (lint/tests/build).
- If exists, prefer
bun.lock/bun lint.bun build - If exists but
bun.lockis not available, tell the user and ask whether to installbunor use the repo’s alternative package manager.bun
- Commit
- Prefer Conventional Commits: ,
fix: ...,feat: ....chore: ...
- Prefer Conventional Commits:
- Push + open PR
- Always use GitHub CLI () for PR workflows (e.g.
gh).gh pr create --fill - If is not authenticated, run
gh(orgh auth loginto check).gh auth status - If is not installed or cannot be authenticated, tell the user and ask whether to install/authenticate or proceed with manual PR creation steps.
gh
- Always use GitHub CLI (
- Fill in PR body
- Use .
references/pr-description-template.md
- Use
- 确认范围
- 重述目标和验收标准。
- 确定可能要修改的文件,避免无关的清理操作。
- 创建分支
- 使用描述性名称:,
fix/<topic>,feat/<topic>。chore/<topic>
- 使用描述性名称:
- 实现变更
- 保持差异内容聚焦,优先使用小型提交。
- 运行质量门禁
- 运行代码仓库的标准命令(lint/测试/构建)。
- 如果存在,优先使用
bun.lock/bun lint。bun build - 如果存在但没有可用的
bun.lock,告知用户并询问是安装bun还是使用仓库的其他包管理器。bun
- 提交
- 优先使用约定式提交:,
fix: ...,feat: ...。chore: ...
- 优先使用约定式提交:
- 推送并打开PR
- PR工作流始终使用GitHub CLI ()(例如
gh)。gh pr create --fill - 如果未完成身份验证,运行
gh(或运行gh auth login检查状态)。gh auth status - 如果未安装或无法完成身份验证,告知用户并询问是安装/完成身份验证,还是继续使用手动创建PR的步骤。
gh
- PR工作流始终使用GitHub CLI (
- 填写PR正文
- 使用模板。
references/pr-description-template.md
- 使用
Notes
注意事项
- Don't force-push unless you're sure it's safe for collaborators.
- If the PR changes UX, include screenshots or a short GIF.
- Prefer for create/view/checks (e.g.
gh,gh pr view).gh pr checks
- 除非你确认对协作者安全,否则不要强制推送。
- 如果PR改动了UX,包含截图或短GIF。
- 优先使用进行创建/查看/检查操作(例如
gh,gh pr view)。gh pr checks
Deliverable
交付内容
Provide:
- Branch name and PR URL (or the exact steps to open it manually).
- PR title/body (using ).
references/pr-description-template.md - Commits included and verification commands run.
- Screenshots/GIFs if UX changed.
提供以下内容:
- 分支名称和PR URL(或手动打开PR的具体步骤)。
- PR标题/正文(使用模板)。
references/pr-description-template.md - 包含的提交记录和运行过的验证命令。
- 如果UX有改动,提供截图/GIF。