Skip to content

Add /sub-issue and /parent-issue comment commands for linking sub-issues from either end #5147

@Ma77Ball

Description

@Ma77Ball

Feature Summary

GitHub supports sub-issue relationships, but linking and unlinking them today requires clicking through the issue UI; there's no way to do it from a comment. Contributors triaging issues often have the relationship in mind while writing a comment and would rather express it in-line, the same way they self-claim issues with /take.

This adds a small family of comment commands that let you create or remove a sub-issue link on either side of the relationship without leaving the comment box.

Proposed Solution or Design

Extend .github/workflows/comment-commands.yml with a new sub-issue job that recognizes four commands on issue comments (not PRs):

Comment on Command Effect
parent /sub-issue #N [#M ...] Links #N (and any further numbers) as sub-issues of the current issue
parent /unsub-issue #N [#M ...] Unlinks #N from the current issue's sub-issues
child /parent-issue #N Sets #N as the parent of the current issue
child /unparent-issue (or /unparent-issue #N) Removes the current issue from its parent; with no argument, the parent is resolved via GraphQL

Example, from a parent issue's comment box:

/sub-issue #1234 #1235

Example, from a child issue:

/parent-issue #1200

Affected Area

Other

Metadata

Metadata

Assignees

Labels

No labels
No labels
No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions