Skip to content

[backport] get_parent method for issue_read (upstream main) #15

Description

@gastrodon

Summary

Adds a get_parent method to the issue_read consolidated tool — the upward counterpart to the existing get_sub_issues. Uses the GraphQL Issue.parent field and returns {"parent": null} when the issue is not a sub-issue. Kept always-on (not feature-gated) to mirror get_sub_issues.

Changes: pkg/github/issues.go +53/-3 lines; pkg/github/issues_test.go +122 lines.

Upstream reference

Fork conflict

Design note. The fork's issue_graph tool traverses sub-issues downward (BFS). get_parent is the upward complement. Both are useful for autonomous agents navigating issue hierarchies. get_parent is in issues.go (not the fork's custom files) and is purely additive — no conflict.

Context

An agent using issue_graph to traverse sub-issues downward had no efficient way to navigate upward to find an issue's parent epic. get_parent closes this gap, completing the vertical traversal API.

Metadata

Metadata

Assignees

No one assigned

    Labels

    backportBackport from upstreamfeatureNew featureno-opFork already has equivalent functionality

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions