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

Return Copilot PR review code suggestions in get_review_comments

Open advancedresearcharray opened this issue 5 months ago • 2 comments

Summary

  • Copilot-generated "Suggest" changesets are not returned by GitHub REST or GraphQL review comment APIs, but they are embedded in the authenticated review thread partial HTML used by the web UI
  • pull_request_read (get_review_comments) now fetches those partials per thread, parses the embedded automatedComment.suggestion payload, and returns structured suggestions on each review comment
  • Human-authored suggestion code blocks in comment bodies are also parsed into the same suggestions array (with a source field distinguishing automated vs body)

Closes #2235

Test plan

  • [x] go test ./pkg/github/ -run 'TestDecode|TestParse|TestFetch|TestEnrich'
  • [x] go test ./pkg/github/ -run 'Test_GetPullRequestComments'
  • [ ] Manual: call pull_request_read(method="get_review_comments", ...) on a PR with Copilot suggestions and verify suggestions are populated

advancedresearcharray avatar Jun 06 '26 21:06 advancedresearcharray

Fixed build break from triple-backtick characters inside the pull_request_read method description raw string (Go syntax error). Updated pull_request_read.snap toolsnap to match the expanded description.

All targeted tests pass locally:

  • go test ./pkg/github/ -run 'TestDecode|TestParse|TestFetch|TestEnrich'
  • go test ./pkg/github/ -run 'Test_GetPullRequestComments'

advancedresearcharray avatar Jun 06 '26 21:06 advancedresearcharray

Merge-ready check-in

This PR looks ready for maintainer review/merge when you have a moment.

  • Change: Return Copilot PR review code suggestions in get_review_comments
  • CI: green / passing
  • Review: REVIEW_REQUIRED (mergeable: CONFLICTING)

Happy to rebase or address any remaining feedback. Thanks for maintaining the project.

advancedresearcharray avatar Jun 12 '26 17:06 advancedresearcharray