ops forgejo pr review: support inline per-file comments #76

Closed
opened 2026-05-25 00:42:19 +00:00 by coilysiren · 0 comments
Owner

Problem

coily ops forgejo pr review (coilysiren/coily#74) supports the top-level review event (APPROVE / REQUEST_CHANGES / COMMENT) with an optional body, but not inline per-file/per-line comments. Reviewers who want to leave specific feedback on a hunk still have to drop to curl.

Scope

Extend (or sibling) coily ops forgejo pr review to accept inline comments. Forgejo's POST /repos/{owner}/{repo}/pulls/{n}/reviews accepts a comments array of:

{
  "path": "relative/path.go",
  "old_position": 12,
  "new_position": 18,
  "body": "..."
}

Two shape options:

  1. --comments-file PATH -> JSON array on disk that gets validated against a Go struct then folded into the existing review POST. Operator-side overhead but one verb invocation.
  2. Build the comments incrementally via a side store, then submit. More complex, more agent-friendly for multi-step reviews.

Option 1 is the smaller surface and matches --body-file ergonomics. Default there unless option 2 has a concrete caller.

Validate each comment entry: non-empty path, exactly one of old_position / new_position set, non-empty body.

Why

Closes the inline-review gap from coilysiren/coily#74. Review automation (lint findings, suggested edits, security-review skill output) wants per-line comments, not just a top-level event.

**Problem** `coily ops forgejo pr review` (coilysiren/coily#74) supports the top-level review event (APPROVE / REQUEST_CHANGES / COMMENT) with an optional body, but not inline per-file/per-line comments. Reviewers who want to leave specific feedback on a hunk still have to drop to curl. **Scope** Extend (or sibling) `coily ops forgejo pr review` to accept inline comments. Forgejo's `POST /repos/{owner}/{repo}/pulls/{n}/reviews` accepts a `comments` array of: ```json { "path": "relative/path.go", "old_position": 12, "new_position": 18, "body": "..." } ``` Two shape options: 1. `--comments-file PATH` -> JSON array on disk that gets validated against a Go struct then folded into the existing review POST. Operator-side overhead but one verb invocation. 2. Build the comments incrementally via a side store, then submit. More complex, more agent-friendly for multi-step reviews. Option 1 is the smaller surface and matches `--body-file` ergonomics. Default there unless option 2 has a concrete caller. Validate each comment entry: non-empty `path`, exactly one of `old_position` / `new_position` set, non-empty `body`. **Why** Closes the inline-review gap from coilysiren/coily#74. Review automation (lint findings, suggested edits, security-review skill output) wants per-line comments, not just a top-level event.
Sign in to join this conversation.
No labels
P0
P1
P2
P3
P4
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
coilyco-bridge/coily#76
No description provided.