pr review cannot post inline review comments or threaded replies #38

Closed
opened 2026-07-18 11:25:08 -04:00 by alexion · 1 comment
Owner

What I ran into

I was asked to reply directly to each of ten inline review comments on a PR.
gitea-axi pr review only accepts a single --body for the whole review, and pr comment only posts one top-level PR comment.
There is no way to attach a comment to a specific path:line, and no way to reply inside an existing comment thread.

As a result "reply to each comment" collapsed into one consolidated review body that restates each thread by hand, rather than a reply landing under each comment where the reviewer left it.

Real gap, not discovery

Real gap — and the underlying SDK already supports it. prReview builds a payload with only event and body:

// src/commands/pr.ts:1216-1221
const payload: CreatePullReviewOptions = { event: chosen.event };
if (body !== undefined) {
  payload.body = body;
}
await api.repos.repoCreatePullReview(context.owner, context.name, number, payload);

But CreatePullReviewOptions also carries a comments array that is never populated:

interface CreatePullReviewOptions {
  body?: string;
  comments?: CreatePullReviewComment[];   // <- unused by gitea-axi
  commit_id?: string;
  event?: ReviewStateType;
}
interface CreatePullReviewComment {
  body?: string;
  new_position?: number;   // comment on a new-file line
  old_position?: number;   // comment on an old-file line
  path?: string;
}

On threaded replies specifically: the pinned gitea-js exposes no "reply to comment id" endpoint — Gitea's model is that a comment posted on the same line joins that line's conversation.
So exposing comments[] covers both "comment on a line" and "reply in a thread" (by anchoring to the same line), which is the 80% case.

Recommendation

Let pr review (and/or pr comment) carry inline comments. For example a repeatable flag:

gitea-axi pr review <n> --comment \
  --on flake.nix:16 --body "..." \
  --on system/default.nix:45 --body "..."

or a --comments-file taking a small JSON/TOON array of { path, line, body }, mapping each to CreatePullReviewComment (new_position for the current side).
This is what "reply directly to each comment" actually needs, and it maps straight onto the SDK field that's already there.

## What I ran into I was asked to reply directly to each of ten inline review comments on a PR. `gitea-axi pr review` only accepts a single `--body` for the whole review, and `pr comment` only posts one top-level PR comment. There is no way to attach a comment to a specific `path:line`, and no way to reply inside an existing comment thread. As a result "reply to each comment" collapsed into one consolidated review body that restates each thread by hand, rather than a reply landing under each comment where the reviewer left it. ## Real gap, not discovery Real gap — and the underlying SDK already supports it. `prReview` builds a payload with only `event` and `body`: ``` // src/commands/pr.ts:1216-1221 const payload: CreatePullReviewOptions = { event: chosen.event }; if (body !== undefined) { payload.body = body; } await api.repos.repoCreatePullReview(context.owner, context.name, number, payload); ``` But `CreatePullReviewOptions` also carries a `comments` array that is never populated: ``` interface CreatePullReviewOptions { body?: string; comments?: CreatePullReviewComment[]; // <- unused by gitea-axi commit_id?: string; event?: ReviewStateType; } interface CreatePullReviewComment { body?: string; new_position?: number; // comment on a new-file line old_position?: number; // comment on an old-file line path?: string; } ``` On threaded replies specifically: the pinned gitea-js exposes no "reply to comment id" endpoint — Gitea's model is that a comment posted on the same line joins that line's conversation. So exposing `comments[]` covers both "comment on a line" and "reply in a thread" (by anchoring to the same line), which is the 80% case. ## Recommendation Let `pr review` (and/or `pr comment`) carry inline comments. For example a repeatable flag: ``` gitea-axi pr review <n> --comment \ --on flake.nix:16 --body "..." \ --on system/default.nix:45 --body "..." ``` or a `--comments-file` taking a small JSON/TOON array of `{ path, line, body }`, mapping each to `CreatePullReviewComment` (`new_position` for the current side). This is what "reply directly to each comment" actually needs, and it maps straight onto the SDK field that's already there.
Author
Owner

Resolved by task 0035 (commit 662ba82), now on main: pr review --comments-file posts inline comments ({path, line, body}) and threaded replies ({reply_to, body}).

Resolved by task 0035 (commit 662ba82), now on `main`: `pr review --comments-file` posts inline comments ({path, line, body}) and threaded replies ({reply_to, body}).
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: alexion/gitea-axi#38