Skip to content

[backport] Issue dependency read/write tools (upstream main) #14

Description

@gastrodon

Summary

Two new feature-flagged tools for issue blocked-by/blocking relationships, gated behind the issue_dependencies feature flag (auto-enabled for insiders):

  • issue_dependency_read: get_blocked_by / get_blocking via Issue.blockedBy / Issue.blocking GraphQL connections, cursor-paginated
  • issue_dependency_write: add / remove × blocked_by / blocking via addBlockedBy / removeBlockedBy mutations; accepts issue numbers, resolves to node IDs in a single aliased query; self-dependency rejected before any round-trip

New file: pkg/github/issue_dependencies.go (448 lines) with AddBlockedByInput and RemoveBlockedByInput GraphQL input types, dependencyConnection structs, and tool registrations in tools.go + feature_flags.go.

Upstream reference

Fork conflict

Mild design consideration. The fork has issue_graph which traverses issue hierarchies (sub-issues, body references, timeline cross-references) via BFS. Blocked-by/blocking relationships are a separate relationship axis not yet covered by issue_graph. The upstream adds standalone tools; the fork might prefer these integrated into issue_graph's traversal. However, the standalone tools are additive and don't break issue_graph.

Context

Fills the MCP gap behind the gh CLI's gh issue block / gh issue unblock verbs (cli/cli#13057). Agents working with issue dependency graphs now have read and write access to the full relationship graph without needing the CLI.

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