github
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseGitHub
GitHub
Overview
概述
Use the GitHub CLI to create PRs, review checks, and inspect CI logs. Follow the repo conventions for commits and PR titles.
使用GitHub CLI创建PR、审查检查项并查看CI日志。遵循仓库的提交与PR标题规范。
Commit conventions
提交规范
Use Conventional Commits:
fix(bumba): stabilize workflowsExample:
fix(bumba): stabilize workflows采用Conventional Commits规范:
fix(bumba): stabilize workflows示例:
fix(bumba): stabilize workflowsCreate a PR
创建PR
- Copy to a temp file.
.github/PULL_REQUEST_TEMPLATE.md - Fill it out.
- Create the PR with .
gh pr create
bash
cp .github/PULL_REQUEST_TEMPLATE.md /tmp/pr.md
$EDITOR /tmp/pr.md
gh pr create --body-file /tmp/pr.md- 将复制到临时文件。
.github/PULL_REQUEST_TEMPLATE.md - 填写模板内容。
- 使用命令创建PR。
gh pr create
bash
cp .github/PULL_REQUEST_TEMPLATE.md /tmp/pr.md
$EDITOR /tmp/pr.md
gh pr create --body-file /tmp/pr.mdCheck CI
检查CI
bash
gh pr checks 2259
gh run view 123456789 --logbash
gh pr checks 2259
gh run view 123456789 --logMerge
合并PR
Use squash merge, do not delete the branch via CLI:
bash
gh pr merge 2202 --squash -R proompteng/lab采用squash merge(压缩合并)方式,不要通过CLI删除分支:
bash
gh pr merge 2202 --squash -R proompteng/labResources
参考资源
- Reference:
references/github-pr-guide.md - Helper:
scripts/create-pr.sh - Sample PR body:
assets/pr-body-template.md
- 参考文档:
references/github-pr-guide.md - 辅助脚本:
scripts/create-pr.sh - PR正文示例:
assets/pr-body-template.md