Skip to content

maintner: sync GitHub PR review (line) comments - #6

Open
raggi wants to merge 1 commit into
bradfitz:mainfrom
raggi:raggi/review-comments
Open

raggi wants to merge 1 commit into
bradfitz:mainfrom
raggi:raggi/review-comments

Conversation

@raggi

@raggi raggi commented Aug 27, 2026

Copy link
Copy Markdown

maintner previously mirrored issue comments (the top-level conversation) and PR review summaries, but not the review comments left on lines of a PR's diff (GitHub's pulls/{number}/comments API). Consumers re-presenting PR data therefore silently lacked all line-level review feedback.

Add a new GithubReviewComment mutation type carrying the comment's body, author, parent review, reply threading, file path, commit IDs, diff-hunk, and line/side position. Unlike issue comment mutations, each mutation is a full snapshot applied wholesale: review comments are mutable and their position fields shift (including to unset) as the PR is updated, which field-presence patching can't represent.

Sync walks comments in updated-time order with the corpus's high-water mark as an incremental cursor (like issue comments), picking up both new comments and edits; deletions are not detected, matching the existing issue comment limitation. The new ReviewComments sync category is on by default. Review comment activity also now feeds GitHubIssue.LastModified, and GitHubIssue.ForeachReviewComment exposes the data to consumers.

@bradfitz bradfitz left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

You'll need to rebase this

maintner previously mirrored issue comments (the top-level conversation)
and PR review summaries, but not the review comments left on lines of a
PR's diff (GitHub's pulls/{number}/comments API). Consumers re-presenting
PR data therefore silently lacked all line-level review feedback.

Add a new GithubReviewComment mutation type carrying the comment's body,
author, parent review, reply threading, file path, commit IDs, diff-hunk,
and line/side position. Unlike issue comment mutations, each mutation is
a full snapshot applied wholesale: review comments are mutable and their
position fields shift (including to unset) as the PR is updated, which
field-presence patching can't represent.

Sync walks comments in updated-time order with the corpus's high-water
mark as an incremental cursor (like issue comments), picking up both new
comments and edits; deletions are not detected, matching the existing
issue comment limitation. The new ReviewComments sync category is on by
default. Review comment activity also now feeds GitHubIssue.LastModified,
and GitHubIssue.ForeachReviewComment exposes the data to consumers.
@raggi
raggi force-pushed the raggi/review-comments branch from e28cef7 to 7c1059f Compare September 29, 2026 17:24
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