feat: add reply_to_review_comment tool for inline PR comment replies #98

Open
opened 2026-03-27 15:19:23 +00:00 by janbaer · 2 comments
janbaer commented 2026-03-27 15:19:23 +00:00 (Migrated from codeberg.org)

Description

Currently the MCP server supports creating general PR comments via create_issue_comment, but there is no way to post a threaded reply to a specific inline review comment (the "reply" button visible under each diff comment
in the Forgejo UI).

The Forgejo API supports this via:

POST /repos/{owner}/{repo}/pulls/{index}/reviews/{id}/comments

with a reply_id field pointing to the comment being replied to.

Motivation

In a code review workflow, the PR author needs to respond directly to each inline reviewer comment — explaining why feedback was addressed, why it was skipped, or why it was incorrect. Without threaded replies, these
responses land as top-level PR comments and lose their context.

This is especially important for AI-assisted review workflows where responses need to be traceable back to specific inline comments.

Acceptance Criteria

  • A new reply_to_review_comment tool is added that accepts owner, repo, pull_index, review_id, comment_id, and body
  • The reply appears as a threaded response under the original inline comment in the Forgejo UI
  • The tool is documented in the README alongside the existing review tools

How to Test

  1. Open a PR with at least one inline review comment
  2. Call reply_to_review_comment with the PR index, review ID, comment ID, and a reply body
  3. Verify the reply appears threaded under the original inline comment in the Forgejo UI
## Description Currently the MCP server supports creating general PR comments via create_issue_comment, but there is no way to post a threaded reply to a specific inline review comment (the "reply" button visible under each diff comment in the Forgejo UI). ## The Forgejo API supports this via: POST /repos/{owner}/{repo}/pulls/{index}/reviews/{id}/comments with a reply_id field pointing to the comment being replied to. ## Motivation In a code review workflow, the PR author needs to respond directly to each inline reviewer comment — explaining why feedback was addressed, why it was skipped, or why it was incorrect. Without threaded replies, these responses land as top-level PR comments and lose their context. This is especially important for AI-assisted review workflows where responses need to be traceable back to specific inline comments. ## Acceptance Criteria - A new reply_to_review_comment tool is added that accepts owner, repo, pull_index, review_id, comment_id, and body - The reply appears as a threaded response under the original inline comment in the Forgejo UI - The tool is documented in the README alongside the existing review tools ## How to Test 1. Open a PR with at least one inline review comment 2. Call reply_to_review_comment with the PR index, review ID, comment ID, and a reply body 3. Verify the reply appears threaded under the original inline comment in the Forgejo UI
goern commented 2026-03-27 22:47:40 +00:00 (Migrated from codeberg.org)

Thanks for the feature request!

After investigation, the forgejo-sdk (all versions including the new v3.0.0) does not expose a method for posting threaded replies to inline review comments. The CreatePullReviewComment struct lacks a reply_to / in_reply_to field, and there is no dedicated SDK method for POST /repos/{owner}/{repo}/pulls/{index}/reviews/{id}/comments with reply threading.

We'd prefer to implement this via the SDK rather than making raw HTTP calls, to stay consistent with the rest of the codebase and benefit from SDK-level validation and versioning.

Marking this as blocked until upstream forgejo-sdk adds support. An issue/contribution to mvdkleijn/forgejo-sdk would unblock this.

Thanks for the feature request! After investigation, the **forgejo-sdk** (all versions including the new v3.0.0) does not expose a method for posting threaded replies to inline review comments. The `CreatePullReviewComment` struct lacks a `reply_to` / `in_reply_to` field, and there is no dedicated SDK method for `POST /repos/{owner}/{repo}/pulls/{index}/reviews/{id}/comments` with reply threading. We'd prefer to implement this via the SDK rather than making raw HTTP calls, to stay consistent with the rest of the codebase and benefit from SDK-level validation and versioning. **Marking this as blocked** until upstream forgejo-sdk adds support. An issue/contribution to [mvdkleijn/forgejo-sdk](https://codeberg.org/mvdkleijn/forgejo-sdk) would unblock this.
enbyted commented 2026-05-12 14:43:10 +00:00 (Migrated from codeberg.org)

I believe a precedent in the codebase has been created a while ago to work around SDK limitations, so maybe that could be unblocked now and implemented directly?

I believe a precedent in the codebase has been created a while ago to work around SDK limitations, so maybe that could be unblocked now and implemented directly?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
agentic-forges/forgejo-mcp#98
No description provided.