Add get_parent method to issue_read#2726
Open
zwick wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds new feature-flagged MCP tools to read and modify GitHub Issue dependency relationships (blocked-by / blocking) using GraphQL connections and the addBlockedBy / removeBlockedBy mutations, filling a gap not covered by existing issue relationship tools.
Changes:
- Introduces
issue_dependency_read(GraphQLIssue.blockedBy/Issue.blocking) with cursor pagination. - Introduces
issue_dependency_write(GraphQLaddBlockedBy/removeBlockedBy) resolving issue numbers to node IDs in a single aliased query. - Adds the
issue_dependenciesfeature flag, tests, toolsnap snapshots, and regenerated docs sections.
Show a summary per file
| File | Description |
|---|---|
| pkg/github/tools.go | Registers the new issue dependency tools in the overall tool inventory (feature-flag gated). |
| pkg/github/issue_dependencies.go | Implements read/write tools and supporting GraphQL query/mutation helpers. |
| pkg/github/issue_dependencies_test.go | Adds schema snapshot validation and behavior tests for the new tools. |
| pkg/github/feature_flags.go | Introduces the issue_dependencies flag and wires it into feature-flag sets. |
| pkg/github/toolsnaps/issue_dependency_read_ff_issue_dependencies.snap | Adds the flag-gated schema snapshot for the read tool. |
| pkg/github/toolsnaps/issue_dependency_write_ff_issue_dependencies.snap | Adds the flag-gated schema snapshot for the write tool. |
| docs/insiders-features.md | Documents the new issue_dependencies flag/tools in insiders features (generated section). |
| docs/feature-flags.md | Documents the new issue_dependencies flag/tools in feature flags (generated section). |
Copilot's findings
- Files reviewed: 8/8 changed files
- Comments generated: 1
Add an upward parent read to issue_read, the counterpart to the existing downward get_sub_issues. Uses the GraphQL Issue.parent field and returns a null parent when the issue is not a sub-issue. Kept always-on (not feature gated) to mirror get_sub_issues; the dependency tools remain flag-gated. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
409844e to
004248c
Compare
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add a
get_parentmethod to the existingissue_readtool that reads an issue's parent — the upward counterpart to the existingget_sub_issues(children).Why
issue_readcould read an issue's children (get_sub_issues) but had no way to read its parent, even though the GitHub API exposes it. This fills that gap with a small, always-on method on a default tool.Refs #2391, #950
What changed
issue_read→ newget_parentmethod. Reads the GraphQLIssue.parentfield and returns a null parent when the issue isn't a sub-issue.get_sub_issues. The schema cost is one enum value plus a couple of doc lines.MCP impact
issue_readgains aget_parentmethod; existing methods are unchanged.Prompts tested (tool changes only)
issue_read/get_parentget_parent(returns null parent when it isn't)Security / limits
reposcope like the rest ofissue_read.Tool renaming
Lint & tests
./script/lint./script/testDocs
issue_readmethod)Split out from the original combined PR. The flag-gated issue dependency tools (
issue_dependency_read/issue_dependency_write) now live in #2751.