- Notifications
You must be signed in to change notification settings - Fork1k
Add tools for sub-issue endpoint#470
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
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
The assertion was already checking User.Login but the mock was incomplete
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Pull Request Overview
This PR adds new tooling endpoints for handling sub-issues within GitHub issues by extending the current server toolset. The changes include the introduction of a read tool for listing sub-issues and write tools for adding, removing, and reprioritizing sub-issues.
Comments suppressed due to low confidence (2)
pkg/github/tools.go:49
- [nitpick] Consider adding a brief comment explaining the intended usage of the ListSubIssues tool, similar to existing documentation for other endpoints.
toolsets.NewServerTool(ListSubIssues(getClient, t))
pkg/github/tools.go:56
- [nitpick] Consider adding inline comments for the new sub-issue write tools to clearly describe their behavior and expected input, ensuring consistency with the rest of the codebase.
toolsets.NewServerTool(AddSubIssue(getClient, t))
Closes:#154
Note that I am calling the GitHub REST API, due to sub-issues not yet in
go-github
- however, it was merged ingoogle/go-github#3580 so I'm happy to let this wait until they cut a new release and refactor.Example use
I have tested the tools with a test repo here:https://github.com/martinnormark/gh-mcp-tests
Specifically I created 3 issues, wheremartinnormark/gh-mcp-tests#1 is the parent. You can look at the history there to see how sub-issues were added, removed, then added again.
It gracefully handled permission error due to token grants:

Fixed the token and asked to retry:

Asking to list sub-issues:

Removing a sub-issue from the parent, not mentioning the parent:

Adding it back again:

Asking to re-order:
