github-mcp-server
github-mcp-server copied to clipboard
Return Copilot PR review code suggestions in get_review_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 embeddedautomatedComment.suggestionpayload, and returns structuredsuggestionson each review comment- Human-authored suggestion code blocks in comment bodies are also parsed into the same
suggestionsarray (with asourcefield distinguishingautomatedvsbody)
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 verifysuggestionsare populated
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'
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.