Skip to content

Return range coordinates for review comments - #3193

Merged
SamMorrowDrums merged 2 commits into
github:mainfrom
yiheng-kkk:fix/review-comment-range-fields
Sep 1, 2026
Merged

Return range coordinates for review comments#3193
SamMorrowDrums merged 2 commits into
github:mainfrom
yiheng-kkk:fix/review-comment-range-fields

Conversation

@yiheng-kkk

Copy link
Copy Markdown

Summary

Returns the start and original line coordinates for pull request review comments, including multi-line and outdated comments.

Why

Without these fields, a comment spanning lines 73–86 is reported only as a comment on line 86.

Fixes #3190

What changed

  • request originalLine, startLine, and originalStartLine in the review-thread query
  • include the nullable coordinates in the minimal response
  • cover multi-line, single-line, and current-line-unavailable comments

MCP impact

  • No tool or API changes
  • Tool schema or behavior changed
  • New tool added

The successful get_review_comments response now includes three optional coordinate fields.

Prompts tested (tool changes only)

  • Not run through an interactive client; Test_GetPullRequestComments covers the GraphQL-to-MCP response path.

Security / limits

  • No security or limits impact
  • Auth / permissions considered
  • Data exposure, filtering, or token/size limits considered

The fields are three nullable integers from the same authorized review comment object and require no extra request.

Tool renaming

  • I am renaming tools as part of this PR (e.g. a part of a consolidation effort)
    • I have added the new tool aliases in deprecated_tool_aliases.go
  • I am not renaming tools as part of this PR

Lint & tests

  • Linted locally with ./script/lint
  • Tested locally with ./script/test

Also ran UPDATE_TOOLSNAPS=true go test ./...; no snapshot changes were needed.

Docs

  • Not needed
  • Updated (README / docs / examples)

Generated docs are unchanged because the input tool schema is unchanged.

@yiheng-kkk
yiheng-kkk requested a review from a team as a code owner September 1, 2026 05:10
Document nullable current and original range fields and assert their serialized omission behavior for single-line and outdated comments.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@SamMorrowDrums
SamMorrowDrums merged commit c2a9364 into github:main Sep 1, 2026
13 checks passed
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.

get_review_comments (pull_request_read) silently drops start_line for multi-line PR review comments

4 participants