fix(github): clarify GetTimelineReviewCommentIDForReview supersede limitations

The supersede path calls GetTimelineReviewCommentIDForReview then EditComment.
On GitHub, EditComment targets /pulls/comments/{id} (for inline review comments),
but review bodies are not inline comments. The PATCH will return 404 and be
logged as a warning. The review itself posts correctly regardless.
This is a known limitation pending a future fix via the reviews PATCH endpoint.
This commit is contained in:
Rodin
2026-05-14 20:21:12 +00:00
parent 06b09ce3b8
commit b531da1355
+6 -3
View File
@@ -529,9 +529,12 @@ func (c *Client) ResolveComment(_ context.Context, _, _ string, _ int64) error {
// GetTimelineReviewCommentIDForReview finds the timeline comment ID for a review.
// GitHub doesn't have a direct timeline event endpoint for reviews the way Gitea does.
// This is primarily used by the cleanup path (EditComment + resolve). On GitHub,
// we return the review ID itself since GitHub PR review IDs are stable.
// Returns the reviewID unchanged for compatibility.
// This is primarily used by the supersede path (EditComment + ResolveComment). On GitHub,
// we return the review ID itself. Note that EditComment on GitHub uses the
// /pulls/comments/{id} endpoint (for inline review comments), which does not
// apply to review bodies — the supersede EditComment call will 404 and be
// logged as a warning. This is a known limitation; the review is still posted
// correctly regardless.
func (c *Client) GetTimelineReviewCommentIDForReview(_ context.Context, _, _ string, _ int, reviewID int64) (int64, error) {
return reviewID, nil
}