github-mcp-server icon indicating copy to clipboard operation
github-mcp-server copied to clipboard

Migrate PR #1515 review threads refactoring to go-sdk

Open Copilot opened this issue 3 weeks ago • 0 comments

Closes: #1515

Resolves merge conflicts caused by the mark3labs/mcp-gomodelcontextprotocol/go-sdk migration. The original PR introduced GraphQL-based review threads for get_review_comments but was based on the old MCP library.

Changes

  • pkg/github/pullrequests.go:
    • PullRequestRead now takes getGQLClient parameter
    • GetPullRequestReviewComments uses GraphQL instead of REST API
    • Added GraphQL types: reviewThreadsQuery, reviewThreadNode, reviewCommentNode, pageInfoFragment
  • pkg/github/tools.go: Updated PullRequestRead registration with GraphQL client
  • Tests/Toolsnaps: Migrated to new SDK patterns

Functional Change (from original PR)

get_review_comments now returns review threads with richer metadata:

{
  "reviewThreads": [
    {
      "isResolved": false,
      "isOutdated": false,
      "isCollapsed": false,
      "comments": [...]
    }
  ],
  "pageInfo": { "hasNextPage": true, "endCursor": "..." },
  "totalCount": 5
}

Tradeoffs: Brings in all main branch SDK migration changes (173 files) to resolve conflicts cleanly rather than cherry-picking individual changes.

[!WARNING]

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • go.googlesource.com
    • Triggering command: /update-job-proxy /update-job-proxy (dns block)
  • go.yaml.in
    • Triggering command: /update-job-proxy /update-job-proxy (dns block)
  • gopkg.in
    • Triggering command: /update-job-proxy /update-job-proxy (dns block)
  • https://api.github.com//advisories
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (http block)
  • https://api.github.com/graphql
    • Triggering command: /tmp/go-build1995616253/b001/github.test /tmp/go-build1995616253/b001/github.test -test.testlogfile=/tmp/go-build1995616253/b001/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.run=Test_GetPullRequest (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

https://github.com/github/github-mcp-server/pull/1515

Introduces some changes to the structure of get_review_comments.

A new pr changed a fundamental underlying library. Just fix the mergeconflicts for me


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot avatar Dec 02 '25 09:12 Copilot