Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 2, 2025

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

#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.

Resolves merge conflicts by migrating the review threads refactoring
from mark3labs/mcp-go to modelcontextprotocol/go-sdk:

- PullRequestRead now uses getGQLClient for get_review_comments
- GetPullRequestReviewComments uses GraphQL to fetch review threads
- Added GraphQL types for review threads query
- Updated tests and toolsnaps for new SDK patterns

Co-authored-by: tonytrg <[email protected]>
Copilot AI changed the title [WIP] Fix merge conflicts in get_review_comments structure Migrate PR #1515 review threads refactoring to go-sdk Dec 2, 2025
Copilot AI requested a review from tonytrg December 2, 2025 09:50
Copilot finished work on behalf of tonytrg December 2, 2025 09:50
@tonytrg tonytrg closed this Dec 3, 2025
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.

2 participants