- Notifications
You must be signed in to change notification settings - Fork3.1k
Add issue_graph tool to visualize issue/PR relationships and hierarchy#1511
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Draft
Copilot wants to merge9 commits intomainChoose a base branch fromcopilot/add-issue-graph-tool
base:main
Could not load branches
Branch not found:{{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline, and old review comments may become outdated.
+1,868 −2
Conversation
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
Co-authored-by: SamMorrowDrums <4811358+SamMorrowDrums@users.noreply.github.com>
Co-authored-by: SamMorrowDrums <4811358+SamMorrowDrums@users.noreply.github.com>
Co-authored-by: SamMorrowDrums <4811358+SamMorrowDrums@users.noreply.github.com>
CopilotAI changed the title[WIP] Add issue_graph tool to visualize issue and PR relationshipsAdd issue_graph tool to visualize issue/PR relationships and hierarchyDec 1, 2025
Copilot finished work on behalf ofSamMorrowDrumsDecember 1, 2025 11:10
…tput- Refactor fetchNode to return raw issue data along with node, avoiding second API call in crawl loop- Add 30 second timeout to prevent runaway crawling- Include parent edges in output by reversing direction for display- Move cross-tool info from description to instructions.go (was already there)- Shorter tool description focusing on core functionality
76f4dbc to4dcc5b6CompareUse ListIssueTimeline API to find issues that have 'cross-referenced'events, which indicates they were mentioned in another issue. Thiscaptures relationships like 'mentioned in#815' that aren't visiblein the issue body or sub-issues.The timeline crawling:- Fetches up to 100 timeline events per issue- Filters for 'cross-referenced' event types- Extracts the source issue from cross-reference events- Adds edges with RelationTypeRelated- Queues referenced issues for further crawling
The text format already provides all necessary information for LLMsto understand the issue graph. The redundant JSON output was addingsignificant token overhead without providing additional value.The text format includes:- Graph summary with focus node info and hierarchy- All nodes with type, state, title, and body preview- Parent/child relationships- Related issue connections
- Add legend explaining node types (epic, batch, task, pr)- Rename 'EDGES' to 'SUB-ISSUES' with explicit parent→child label- Rename 'RELATED' to 'CROSS-REFERENCES' with mentioned/referenced label- Use ↔ symbol for bidirectional cross-references- Show '(none)' for empty sections instead of blank- Remove redundant JSON output to reduce token usage
…/PR relationshipsThis prompt provides a guided workflow for:1. Running issue_graph to see current state2. Searching for related issues/PRs that should be connected3. Identifying orphaned or missing relationships4. Proposing and adding connections with user approval5. Verifying connections via issue_graphParameters:- owner/repo/issue_number: The issue/PR to analyze- additional_repos: Cross-repo search (e.g., epic in planning repo)- known_links: User-provided issue URLs that should be connected
Sign up for freeto 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.
Uh oh!
There was an error while loading.Please reload this page.
Closes:#1510
Adds
issue_graphtool to the issues toolset that returns a graph representation of issue/PR relationships. Enables understanding work hierarchy (epic → batch → task → PR) in a single tool call instead of multiple sequential calls.Key Features
closes/fixes/resolveskeywords in body#Xmentions in body (code blocks stripped to avoid false positives)Example Output
Running
issue_graphon this PR (#1511):What an LLM Gets From This Data
From a single tool call, an LLM can understand:
#1510 (task) → #1511 (pr)shows this PR is the direct child of the planning issueprandAdd issue_graph tool to visualize issue/PR relationships and hierarchy #1510 is ataskhelps the LLM understand the work stageThis replaces what would otherwise be 5-10 sequential API calls with a single comprehensive response.
Tradeoffs
#123), cross-repo uses full form (owner/repo#123)Alternatives Considered