Skip to content

Conversation

@varin-nair-factory
Copy link
Collaborator

@varin-nair-factory varin-nair-factory commented Jan 28, 2026

Closes FAC-15570

Bug

Users see a 404 error when update-comment-link.ts tries to fetch a comment:

GET /repos/{owner}/{repo}/issues/comments/{id} - 404
HttpError: Not Found - https://docs.github.com/rest/issues/comments#get-an-issue-comment

Root Cause

GitHub uses separate ID namespaces and API endpoints for:

• Issue comments (issues.getComment)
• PR review comments (pulls.getReviewComment)

The original code determined which API to call based solely on the event type (pull_request_review_comment vs everything else). However, the DROID_COMMENT_ID could be a PR review comment ID even when the current event is pull_request (e.g., the comment was created in a previous workflow step).

When querying a PR review comment ID via the issue comments endpoint, GitHub returns 404.

Fix

Extracted comment fetching into a new helper function fetchDroidComment that tries both APIs:

First tries the API matching the event type (for efficiency)

Falls back to the other API if the first returns 404

This handles cases where the comment type doesn't match the event type.

@varin-nair-factory varin-nair-factory self-assigned this Jan 28, 2026
@varin-nair-factory varin-nair-factory merged commit 72a1949 into dev Jan 28, 2026
6 of 7 checks passed
@varin-nair-factory varin-nair-factory deleted the varin/fix-fetch-droid-comment-id-bug branch January 28, 2026 19:01
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