词元之母TOK.MOM - 平台充值汇率 1:1 即 1 人民币充值到账 1 美元,支持一个 Key 调用近 600+ 海内外模型,限时特价模型低至 1 折,欢迎上岸!
| 来源 | 内置(默认安装) |
| 路径 | skills/github/github-pr-workflow |
| 版本 | 1.1.0 |
| 作者 | Hermes Agent |
| 许可证 | MIT |
| 平台 | linux, macos, windows |
| 标签 | GitHub, Pull-Requests, CI/CD, Git, Automation, Merge |
| 相关 skill | github-auth, github-code-review |
gh 方式,再给出适用于无 gh 环境的 git + curl 备用方案。github-auth skill)curl 命令需要 owner/repo。从 git 远程地址中提取:git 操作——两种方式完全相同:feat/description — 新功能fix/description — 缺陷修复refactor/description — 代码重构docs/description — 文档ci/description — CI/CD 变更write_file、patch)进行修改,然后提交:type(scope): short description
Longer explanation if needed. Wrap at 72 characters.feat、fix、refactor、docs、test、ci、chore、perf--draft、--reviewer user1,user2、--label "enhancement"、--base developnumber——请保存以供后续命令使用。"draft": true。patch、write_file)进行修复:read_file + patch/write_file → 修复代码git add . && git commit -m "fix: ..." && git push"merge"(合并提交)、"squash"、"rebase"| 操作 | gh | git + curl |
|---|---|---|
| 列出我的 PR | gh pr list --author @me | curl -s -H "Authorization: token $GITHUB_TOKEN" "https://api.github.com/repos/$OWNER/$REPO/pulls?state=open" |
| 查看 PR diff | gh pr diff | git diff main...HEAD(本地)或 curl -H "Accept: application/vnd.github.diff" ... |
| 添加评论 | gh pr comment N --body "..." | curl -X POST .../issues/N/comments -d '{"body":"..."}' |
| 请求审查 | gh pr edit N --add-reviewer user | curl -X POST .../pulls/N/requested_reviewers -d '{"reviewers":["user"]}' |
| 关闭 PR | gh pr close N | curl -X PATCH .../pulls/N -d '{"state":"closed"}' |
| 检出他人的 PR | gh pr checkout N | git fetch origin pull/N/head:pr-N && git checkout pr-N |