Skip to content

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

martinnormark
Copy link

Closes: #154

Note that I am calling the GitHub REST API, due to sub-issues not yet in go-github - however, it was merged in google/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, where martinnormark/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:
Screenshot 2025-06-04 at 00 08 30

Fixed the token and asked to retry:
Screenshot 2025-06-04 at 00 11 01

Asking to list sub-issues:
Screenshot 2025-06-04 at 00 11 26

Removing a sub-issue from the parent, not mentioning the parent:
Screenshot 2025-06-04 at 00 11 56

Adding it back again:
Screenshot 2025-06-04 at 00 12 47

Asking to re-order:
Screenshot 2025-06-04 at 00 13 05

@Copilot Copilot AI review requested due to automatic review settings June 3, 2025 22:19
@martinnormark martinnormark requested a review from a team as a code owner June 3, 2025 22:19
Copy link
Contributor

@Copilot Copilot AI left a 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))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sub-issue endpoint
1 participant