用途:为 GitHub Issue 提供状态机与代码集成规范,配合 gh-issue-templates、gh-issue-triage 与 gh-wrangler 代理构成完整工作流。
主要能力:定义开放状态(needs-triage、needs-info、accepted、in-progress、blocked)与关闭状态(completed、duplicate、won't fix、invalid、stale)及其标签与含义;给出分支命名形式,如 feat/123-short-description、fix/123-short-description、chore/123-short-description、docs/123-short-description、i18n/locale-code;说明 PR 标题与正文用法,如 feat: add dark mode (#42),以及 Closes #123、Fixes #123、Resolves #123 自动关闭,Related to #45、See also #67、Depends on #89 仅关联不关闭。
使用方式:开始工作可用 gh issue develop 123 --checkout,或 git checkout -b fix/123-description main 并 gh issue edit 123 --add-label "in-progress";通过 PR 完成时用 gh pr create --title "fix: resolve issue (#123)" --body "Closes #123";标记阻塞用 gh issue edit 移除 in-progress、添加 blocked 并评论说明;手动关闭需加评论,如 gh issue close 123 --comment "Duplicate of #456"。
适用场景:Issue 生命周期管理、分支与 PR 关联、stale 检测与自动关闭、批量关闭与重打标签、跨仓库转移。
限制:示例中的日期命令、GitHub Action 版本与具体天数仅为资料所载,需按实际环境核对;其余功能、收费与平台信息暂未提供。