Skip to content

Conversation

@almaleksia
Copy link
Contributor

@almaleksia almaleksia commented Oct 13, 2025

Consolidation of issue tools.

get_issue
get_issue_comments
list_labels (with issue_number)
list_sub_issues

are now consolidated under issue_read with method parameter:

get
get_comments
get_labels
get_sub_issues

create_issue
update_issue

are now consolidated under issue_write with method parameter:

create
update

add_sub_issue
remove_sub_issue
reprioritize_sub_issue

are consolidated under sub_issue_write with method parameter:

add
reprioritize
remove

Other changes:

I kept list_labels tool but only for listing repo labels.

UPD: Changes after benchmarks and testing

  1. Added get_comments method to pull_request_read that returns PR non-review comments. Models struggle a lot distinguishing the 2 so I decided we better have get_comments both in pull_request_read and issue_read.
  2. Added more hints for the model to distinguish review and regular comments.

@almaleksia almaleksia force-pushed the almaleksia/consolidate-issues branch from 380ada9 to d62af97 Compare October 14, 2025 09:58
@almaleksia almaleksia marked this pull request as ready for review October 14, 2025 11:14
@almaleksia almaleksia requested a review from a team as a code owner October 14, 2025 11:14
Copilot AI review requested due to automatic review settings October 14, 2025 11:14
Copy link
Contributor

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 consolidates various issue-related tools to reduce the number of exposed tools and improve consistency across the GitHub MCP server API. The changes group related operations under unified tools with a method parameter to specify the exact action.

Key Changes:

  • Consolidates read operations (get_issue, get_issue_comments, list_sub_issues, and issue label listing) under issue_read
  • Merges write operations (create_issue and update_issue) under issue_write
  • Combines sub-issue operations (add_sub_issue, remove_sub_issue, reprioritize_sub_issue) under sub_issue_write

Reviewed Changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated no comments.

Show a summary per file
File Description
pkg/github/tools.go Updates tool registration to use consolidated tools instead of individual ones
pkg/github/labels_test.go Removes test cases for issue-specific label listing functionality
pkg/github/labels.go Simplifies ListLabels to only handle repository labels, removing issue-specific functionality
pkg/github/issues_test.go Updates all test cases to use consolidated tools with method parameters
pkg/github/issues.go Implements consolidated issue tools with method-based routing and extracts implementation functions
Multiple toolsnaps files Updates tool snapshots to reflect consolidated tool schemas
README.md Updates documentation to reflect the new consolidated tool structure
Comments suppressed due to low confidence (4)

pkg/github/issues.go:1

  • The required fields validation has changed from including 'title' to only requiring 'method', 'owner', 'repo'. This means title is no longer required for create operations, but the CreateIssue function still validates title is not empty. Consider adding a test case that verifies the error handling when title is missing for create method.
package github

pkg/github/issues.go:1

  • The required fields for issue_write no longer include 'issue_number', but the update method still requires it. Consider adding test coverage to verify that calling update method without issue_number parameter results in an appropriate error.
package github

pkg/github/issues.go:1

  • The parameter name has changed from 'per_page' to 'perPage' to maintain consistency with camelCase naming convention, but this should be verified against the API documentation to ensure it matches expected parameter naming.
package github

pkg/github/issues.go:1

  • There are redundant error checks - the code checks result.IsError twice and calls t.Fatalf followed by require.False which will never be reached if the first condition is true. Remove the redundant require.False(t, result.IsError) line.
package github

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@almaleksia almaleksia force-pushed the almaleksia/consolidate-issues branch from 0b98918 to db71d80 Compare October 17, 2025 12:56
@tonytrg
Copy link
Contributor

tonytrg commented Oct 21, 2025

lgtm

@almaleksia almaleksia merged commit 3ba8d4a into main Oct 23, 2025
16 checks passed
@almaleksia almaleksia deleted the almaleksia/consolidate-issues branch October 23, 2025 11:27
nacx added a commit to envoyproxy/ai-gateway that referenced this pull request Oct 27, 2025
**Description**

GitHub has consolidated the tools related to issues, causing some of our
integration tests to break. This PR adjusts the tests and docs to use
the new tool names.

**Related Issues/PRs (if applicable)**

GitHub PR: github/github-mcp-server#1211

**Special notes for reviewers (if applicable)**

N/A

Signed-off-by: Ignasi Barrera <ignasi@tetrate.io>
Copy link

@jeuancanul1995 jeuancanul1995 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Y

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.

5 participants