From b531da13556c7cd92ec79fd9177a85a147d54d02 Mon Sep 17 00:00:00 2001 From: Rodin Date: Thu, 14 May 2026 20:21:12 +0000 Subject: [PATCH] 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. --- github/methods.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/github/methods.go b/github/methods.go index 9e2436b..8cc01d6 100644 --- a/github/methods.go +++ b/github/methods.go @@ -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 }