Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged
LuluBeatson merged 28 commits intogithub:mainfrommartinnormark:feat/sub-issues
Jul 22, 2025

Conversation

martinnormark
Copy link
Contributor

Closes:#154

Note that I am calling the GitHub REST API, due to sub-issues not yet ingo-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:
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

aki77 reacted with thumbs up emojimoriq-bizreach, maxbeizer, azenMatt, and devinmcinnis reacted with heart emoji
@CopilotCopilotAI review requested due to automatic review settingsJune 3, 2025 22:19
@martinnormarkmartinnormark requested a review froma team as acode ownerJune 3, 2025 22:19
Copilot

This comment was marked as outdated.

@a-man-called-qa-man-called-q mentioned this pull requestJun 14, 2025
@martinnormark
Copy link
ContributorAuthor

Sub-issues ingo-githubnow released. Will refactor the code here to use that, instead of direct REST calls.

IrynaKulakova reacted with thumbs up emoji

@martinnormarkmartinnormark marked this pull request as draftJune 26, 2025 10:21
@martinnormarkmartinnormark marked this pull request as draftJune 26, 2025 10:21
@LuluBeatsonLuluBeatson self-assigned thisJul 21, 2025
LuluBeatsonand others added5 commitsJuly 21, 2025 19:20
* fix: Add SHA to get_file_contents while preserving MCP behavior (#595)Enhance get_file_contents to include SHA information without changingthe existing MCP server response format.Changes:- Add Contents API call to retrieve SHA before fetching raw content- Include SHA in resourceURI (repo://owner/repo/sha/{SHA}/contents/path)- Add SHA to success messages- Update tests to verify SHA inclusion- Maintain original behavior: text files return raw text, binaries return base64This preserves backward compatibility while providing SHA informationfor better file versioning support.Closes#595* fix: Improve error handling for Contents API responseEnsure response body is properly closed even when an error occurs by movingthe defer statement before the error check. This prevents potential resourceleaks when the Contents API returns an error with a non-nil response.Changes:- Move defer respContents.Body.Close() before error checking- Rename errContents to err for consistency- Add nil check for respContents before attempting to close bodyThis follows Go best practices for handling HTTP responses and preventspotential goroutine/memory leaks.* revert changes to resource URI* use GraphQL API to get file SHA* refactor: mock GQL client instead of getFileSHA function to follow conventions* lint* revert GraphQL---------Co-authored-by: LuluBeatson <lulubeatson@github.com>
D1M1TR10Sand others added7 commitsJuly 21, 2025 19:20
… governance info for the github server (#695)* Refactor README and add host installation guides, governance docs- Reorganized README for clarity and navigation- Added dedicated installation guides for Claude, Cursor, Windsurf, JetBrains, and more- Clarified contribution guidelines and approval criteria- Added policies and governance documentation* Update README.md* Update README with configuration section for remote GitHub MCP Server* Update MCP access policy description in READMERemoving coding agent from the policy note, as the GitHub server is unaffected by this policy* Update configuration steps for GitHub Copilot in JetBrains IDEs......to reflect changes in accessing settings and configuring MCP.* Update install-other-copilot-ides.md* Update Eclipse MCP support version and configuration steps......for GitHub Copilot plugin in installation guide.* Update docs/installation-guides/install-cursor.md* Update docs/installation-guides/install-windsurf.md* Apply suggestion from@tonytrg* Apply suggestion from@tonytrg* Apply suggestion from@tonytrg* Apply suggestion from@tonytrg* Apply suggestion from@tonytrg* Apply suggestion from@tonytrg* Apply suggestion from@tonytrg---------Co-authored-by: Tony Truong <tonytrg@github.com>
* shorten tool name* update function name to match tool name* adjust wording of descriptions
* Update installation guide for GitHub MCP ServerRemoved reference to GitHub.com in the installation guide. The GitHub server is available to Coding Agent by default, without installation needed.* Rename section to 'Install in Other MCP Hosts'Updating title for consistency and adding a link to the "other Copilot IDEs" install guide.* Revise installation guide for Cursor MCP setupUpdated installation guide for Cursor with steps clarified, remote server installation, and one-click install deeplinks to open Cursor and add the github server to the config file.
* Added installation instructions for mcpcurl* Update cmd/mcpcurl/README.mdCo-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>---------Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* initial pagination for `ListDiscussions`* redo category id var cast* add GraphQL pagination support for discussion comments and categories* remove pageinfo returns* fix out ref for linter* update docs* move to unified pagination for consensus on params* update docs* refactor pagination handling* update docs* linter fix* conv rest to gql params for safe lint* add nolint* add error handling for perPage value in ToGraphQLParams* refactor pagination error handling* unified params for rest andn graphql and rennamed to be uniform for golang* add 'after' for pagination* update docs* Update pkg/github/discussions.goCo-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>* Update pkg/github/discussions.goCo-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>* Update pkg/github/discussions_test.goCo-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>* update default page size const* reduce default pagination size from 100 to 30 in discussion tests* update pagination for reverse and total* update pagination to remove from discussions* updated README* improve the `ToGraphQLParams` function---------Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@LuluBeatsonLuluBeatson marked this pull request as ready for reviewJuly 21, 2025 18:28
Copy link
Contributor

@CopilotCopilotAI 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 four new tools for managing GitHub sub-issues functionality, enabling users to add, list, remove, and reprioritize sub-issues through the GitHub MCP server. The changes include comprehensive test coverage and direct REST API integration since sub-issues are not yet available in the go-github library.

  • Adds sub-issue management tools to the default toolset configuration
  • Implements four new sub-issue operations with proper error handling and validation
  • Provides extensive test coverage for all sub-issue operations including edge cases

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
FileDescription
pkg/github/tools.goRegisters new sub-issue tools in the default toolset
pkg/github/issues.goImplements four sub-issue management functions with REST API integration
pkg/github/issues_test.goComprehensive test suite covering all sub-issue operations and edge cases
pkg/github/toolsnaps/*.snapTool schema snapshots for sub-issue operations
README.mdDocumentation updates describing the new sub-issue tools and their parameters
Comments suppressed due to low confidence (2)

pkg/github/issues.go:177

  • [nitpick] The parameter name 'sub_issue_id' is inconsistent with GitHub API conventions. Consider renaming to 'sub_issue_number' for consistency with other issue number parameters in the codebase.
mcp.WithNumber("sub_issue_id",

pkg/github/issues_test.go:1804

  • [nitpick] Test case 'missing required parameter owner' creates a mockedClient but doesn't need it since validation fails before any HTTP call. This creates unnecessary test setup overhead.
mockedClient: mock.NewMockedHTTPClient(

Batdill reacted with thumbs up emoji
@LuluBeatson
Copy link
Contributor

Thank you@martinnormark for adding the sub-issue tools and for updating go-github to v73 (#597)!

We have:

  • Updated this branch, bringing the go-github upgrade
  • Refactored the Add, List, Reprioritize tools to use the go-github client methods for sub-issues
    • For Delete, we've left it as your original HTTP DELETE request because of abug in the go-github client's method for this endpoint. Once the fix is released, this tool can be refactored as a follow up.
  • Refactored the unit tests to use go-github-mock's existing endpoint patterns
  • Added toolsnaps and auto-generated docs for the new tools
AddScreenshot 2025-07-21 at 19 10 06
ListScreenshot 2025-07-21 at 18 42 38
ReprioritiseScreenshot 2025-07-21 at 19 11 56
DeleteScreenshot 2025-07-21 at 18 44 55
martinnormark, wtf403, and devinmcinnis reacted with thumbs up emoji

@martinnormark
Copy link
ContributorAuthor

@LuluBeatson Fantastic! Thanks for progressing it!

@LuluBeatsonLuluBeatson merged commit60a5391 intogithub:mainJul 22, 2025
10 checks passed
@martinnormarkmartinnormark deleted the feat/sub-issues branchJuly 22, 2025 09:08
nickytonline pushed a commit to nickytonline/github-mcp-http that referenced this pull requestOct 4, 2025
* Create 'add sub-issue' tool* Fix hardcoded API host* Create 'list sub-issues' tool* Create 'remove sub-issue' tool* Fix Test_GetIssue mock data - add missing User fieldThe assertion was already checking User.Login but the mock was incomplete* Create 'reprioritize sub-issue' tool* fixes* use go github pck to add sub-issues* Update to use go github package* update description* update to use go github v73* lint, docs* refactor: tests to use go-github-mock* add toolsnaps* make RemoveSubIssue use NewGitHubAPIErrorResponse, update docstring* Always include SHA in get_file_contents responses (github#676)* fix: Add SHA to get_file_contents while preserving MCP behavior (github#595)Enhance get_file_contents to include SHA information without changingthe existing MCP server response format.Changes:- Add Contents API call to retrieve SHA before fetching raw content- Include SHA in resourceURI (repo://owner/repo/sha/{SHA}/contents/path)- Add SHA to success messages- Update tests to verify SHA inclusion- Maintain original behavior: text files return raw text, binaries return base64This preserves backward compatibility while providing SHA informationfor better file versioning support.Closesgithub#595* fix: Improve error handling for Contents API responseEnsure response body is properly closed even when an error occurs by movingthe defer statement before the error check. This prevents potential resourceleaks when the Contents API returns an error with a non-nil response.Changes:- Move defer respContents.Body.Close() before error checking- Rename errContents to err for consistency- Add nil check for respContents before attempting to close bodyThis follows Go best practices for handling HTTP responses and preventspotential goroutine/memory leaks.* revert changes to resource URI* use GraphQL API to get file SHA* refactor: mock GQL client instead of getFileSHA function to follow conventions* lint* revert GraphQL---------Co-authored-by: LuluBeatson <lulubeatson@github.com>* Reorganize README, add dedicated install guides, include policies and governance info for the github server (github#695)* Refactor README and add host installation guides, governance docs- Reorganized README for clarity and navigation- Added dedicated installation guides for Claude, Cursor, Windsurf, JetBrains, and more- Clarified contribution guidelines and approval criteria- Added policies and governance documentation* Update README.md* Update README with configuration section for remote GitHub MCP Server* Update MCP access policy description in READMERemoving coding agent from the policy note, as the GitHub server is unaffected by this policy* Update configuration steps for GitHub Copilot in JetBrains IDEs......to reflect changes in accessing settings and configuring MCP.* Update install-other-copilot-ides.md* Update Eclipse MCP support version and configuration steps......for GitHub Copilot plugin in installation guide.* Update docs/installation-guides/install-cursor.md* Update docs/installation-guides/install-windsurf.md* Apply suggestion from@tonytrg* Apply suggestion from@tonytrg* Apply suggestion from@tonytrg* Apply suggestion from@tonytrg* Apply suggestion from@tonytrg* Apply suggestion from@tonytrg* Apply suggestion from@tonytrg---------Co-authored-by: Tony Truong <tonytrg@github.com>* fix: shorten long tool name for adding pr review comments (github#697)* shorten tool name* update function name to match tool name* adjust wording of descriptions* Update installation guide for GitHub MCP Server (github#699)* Update installation guide for GitHub MCP ServerRemoved reference to GitHub.com in the installation guide. The GitHub server is available to Coding Agent by default, without installation needed.* Rename section to 'Install in Other MCP Hosts'Updating title for consistency and adding a link to the "other Copilot IDEs" install guide.* Revise installation guide for Cursor MCP setupUpdated installation guide for Cursor with steps clarified, remote server installation, and one-click install deeplinks to open Cursor and add the github server to the config file.* fix: make mcpcurl support "integer" type (github#688)- FYI:https://json-schema.org/understanding-json-schema/reference/numeric#integer* Added installation instructions for mcpcurl (github#719)* Added installation instructions for mcpcurl* Update cmd/mcpcurl/README.mdCo-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>---------Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>* Add pagination support to GraphQL-based tools (github#683)* initial pagination for `ListDiscussions`* redo category id var cast* add GraphQL pagination support for discussion comments and categories* remove pageinfo returns* fix out ref for linter* update docs* move to unified pagination for consensus on params* update docs* refactor pagination handling* update docs* linter fix* conv rest to gql params for safe lint* add nolint* add error handling for perPage value in ToGraphQLParams* refactor pagination error handling* unified params for rest andn graphql and rennamed to be uniform for golang* add 'after' for pagination* update docs* Update pkg/github/discussions.goCo-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>* Update pkg/github/discussions.goCo-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>* Update pkg/github/discussions_test.goCo-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>* update default page size const* reduce default pagination size from 100 to 30 in discussion tests* update pagination for reverse and total* update pagination to remove from discussions* updated README* improve the `ToGraphQLParams` function---------Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>* shorten param descriptions* fix: resp nil check in error handling in RemoveSubIssue function---------Co-authored-by: LuluBeatson <lulubeatson@github.com>Co-authored-by: tommaso-moro <tommaso-moro@github.com>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

Copilot code reviewCopilotCopilot left review comments

@JoannaaKLJoannaaKLJoannaaKL approved these changes

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Sub-issue endpoint

9 participants

@martinnormark@LuluBeatson@JoannaaKL@tommaso-moro@yonaka15@D1M1TR10S@bitsark@Bupalchow@mattdholloway

[8]ページ先頭

©2009-2025 Movatter.jp