issue-management
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseUse this skill when creating, editing, inspecting, or removing relationships between GitHub issues.
These commands use the Issues 2.0 support added in GitHub CLI PR cli/cli#13057. Because this feature is new, first confirm the installed supports it:
gh issueghbash
gh issue create --help | grep -E -- '--parent|--blocked-by|--blocking'
gh issue edit --help | grep -E -- '--parent|--add-sub-issue|--add-blocked-by|--add-blocking'If those flags are missing, update before trying to manage issue relationships. Do not invent older commands.
gh在创建、编辑、查看或移除 GitHub Issue 之间的关系时使用此 skill。
bash
gh issue create --help | grep -E -- '--parent|--blocked-by|--blocking'
gh issue edit --help | grep -E -- '--parent|--add-sub-issue|--add-blocked-by|--add-blocking'如果缺少这些 flags,请在尝试管理 Issue 关系之前更新 。不要使用并不存在的旧版命令。
ghIssue reference format
Issue 引用格式
Relationship flags accept issue numbers or issue URLs.
Use a number for an issue in the current repository:
bash
gh issue edit 123 --parent 100Use a full issue URL for a cross-repository relationship:
bash
gh issue edit 123 --blocked-by https://github.com/remotion-dev/remotion/issues/456Multiple related issues can be passed as a comma-separated list:
bash
gh issue edit 123 --add-blocked-by 200,201关系 flags 接受 Issue 编号或 Issue URL。
对于当前仓库中的 Issue,使用编号:
bash
gh issue edit 123 --parent 100对于跨仓库关系,使用完整的 Issue URL:
bash
gh issue edit 123 --blocked-by https://github.com/remotion-dev/remotion/issues/456多个相关 Issue 可以通过逗号分隔的列表传入:
bash
gh issue edit 123 --add-blocked-by 200,201Parent and sub-issue relationships
父 Issue 与子 Issue 关系
A sub-issue has exactly one parent issue.
To create a new issue directly under a parent:
bash
gh issue create \
--title 'Docs: Add issue management skill' \
--body-file /tmp/remotion-issue-body.md \
--parent 100To set or change the parent of an existing child issue:
bash
gh issue edit <child-number> --parent <parent-number-or-url>To remove the parent from a child issue:
bash
gh issue edit <child-number> --remove-parentTo manage children from the parent issue:
bash
gh issue edit <parent-number> --add-sub-issue <child-number-or-url>
gh issue edit <parent-number> --remove-sub-issue <child-number-or-url>--add-sub-issue--add-sub-issue一个子 Issue 恰好有一个父 Issue。
要在父 Issue 下直接创建新 Issue:
bash
gh issue create \
--title 'Docs: Add issue management skill' \
--body-file /tmp/remotion-issue-body.md \
--parent 100要为现有子 Issue 设置或更改父 Issue:
bash
gh issue edit <child-number> --parent <parent-number-or-url>要从子 Issue 中移除父 Issue:
bash
gh issue edit <child-number> --remove-parent要从父 Issue 管理其子 Issue:
bash
gh issue edit <parent-number> --add-sub-issue <child-number-or-url>
gh issue edit <parent-number> --remove-sub-issue <child-number-or-url>如果子 Issue 已有其他父 Issue, 会将其移动到新父 Issue 下。不要在同一条命令中针对多个父 Issue 使用 ;一个子 Issue 不能以有歧义的方式添加到多个父 Issue。
--add-sub-issue--add-sub-issueBlocked-by and blocking relationships
Blocked-by 与 blocking 关系
Use when the issue being edited is waiting on another issue.
blocked-bybash
undefined如果正在编辑的 Issue 正在等待另一个 Issue,请使用 。
blocked-bybash
undefinedIssue 123 is blocked by issue 200.
Issue 123 is blocked by issue 200.
gh issue edit 123 --add-blocked-by 200
gh issue edit 123 --add-blocked-by 200
Remove that relationship.
Remove that relationship.
gh issue edit 123 --remove-blocked-by 200
Use `blocking` when the issue being edited blocks another issue.
```bashgh issue edit 123 --remove-blocked-by 200
如果正在编辑的 Issue 阻塞了另一个 Issue,请使用 `blocking`。
```bashIssue 123 is blocking issues 300 and 301.
Issue 123 is blocking issues 300 and 301.
gh issue edit 123 --add-blocking 300,301
gh issue edit 123 --add-blocking 300,301
Remove one blocking relationship.
Remove one blocking relationship.
gh issue edit 123 --remove-blocking 300
Equivalent mental model:
```bash
gh issue edit A --add-blocking Bmeans the same relationship as:
bash
gh issue edit B --add-blocked-by AChoose the command based on which issue you are already editing.
When creating an issue, set relationships immediately:
bash
gh issue create \
--title 'Studio: Add timeline validation' \
--body-file /tmp/remotion-issue-body.md \
--blocked-by 200,201 \
--blocking 300gh issue edit 123 --remove-blocking 300
等价的理解方式:
```bash
gh issue edit A --add-blocking B表示与以下命令相同的关系:
bash
gh issue edit B --add-blocked-by A根据当前正在编辑的是哪个 Issue 来选择命令。
创建 Issue 时,可以立即设置关系:
bash
gh issue create \
--title 'Studio: Add timeline validation' \
--body-file /tmp/remotion-issue-body.md \
--blocked-by 200,201 \
--blocking 300Inspecting relationships
查看关系
Human-readable view shows parent, sub-issues, blocked-by, and blocking metadata when present:
bash
gh issue view <number>Raw non-TTY output includes stable relationship lines:
bash
gh issue view <number> | grep -E '^(parent|sub-issues|sub-issues-completed|blocked-by|blocking):'For scripts, request the JSON fields explicitly:
bash
gh issue view <number> \
--json parent,subIssues,subIssuesSummary,blockedBy,blockingsubIssuesblockedByblockingnodestotalCountsubIssuesSummary人类可读视图会在相应信息存在时显示 parent、sub-issues、blocked-by 和 blocking 元数据:
bash
gh issue view <number>原始非 TTY 输出包含格式稳定的关系行:
bash
gh issue view <number> | grep -E '^(parent|sub-issues|sub-issues-completed|blocked-by|blocking):'对于脚本,请显式请求 JSON 字段:
bash
gh issue view <number> \
--json parent,subIssues,subIssuesSummary,blockedBy,blockingsubIssuesblockedByblockingnodestotalCountsubIssuesSummarySafe workflow
安全工作流
- Create any new issue bodies with , not inline multiline shell strings.
--body-file - Link the relationship using the appropriate or
gh issue createflag.gh issue edit - Verify with or
gh issue view <number>.gh issue view <number> --json parent,subIssues,subIssuesSummary,blockedBy,blocking - If editing a PR or parent issue body afterward, replace vague checklist text with concrete issue numbers.
- 使用 创建所有新 Issue 正文,不要使用内联的多行 shell 字符串。
--body-file - 使用适当的 或
gh issue createflag 链接关系。gh issue edit - 使用 或
gh issue view <number>进行验证。gh issue view <number> --json parent,subIssues,subIssuesSummary,blockedBy,blocking - 如果之后编辑 PR 或父 Issue 正文,请将模糊的检查清单文本替换为具体的 Issue 编号。