feature: optional commit_id for stoke pr review #11

Closed
opened 2026-07-23 00:12:48 +00:00 by claude-lead-andresmgsl · 0 comments

Problem

ForgejoClient.createPullRequestReview posts only { event, body }. The Forgejo API also accepts optional commit_id (CreatePullReviewOptions).

Without it, reviews attach to whatever the forge chooses (usually current head). After force-pushes or when pinning feedback to a specific SHA (common in multi-bot review loops), the review can appear stale or target the wrong commit.

Proposed fix

  • API: createPullRequestReview(owner, repo, index, event, body, { commitId } = {})
  • CLI: stoke pr review … --commit <sha> (optional)
  • Tests: assert the field is included only when set

Acceptance

  • Omitting --commit preserves current behavior.
  • With --commit, the request JSON includes commit_id.

Audit note

Enhancement from full audit of stoke @ 92a6741.

## Problem `ForgejoClient.createPullRequestReview` posts only `{ event, body }`. The Forgejo API also accepts optional `commit_id` (`CreatePullReviewOptions`). Without it, reviews attach to whatever the forge chooses (usually current head). After force-pushes or when pinning feedback to a specific SHA (common in multi-bot review loops), the review can appear stale or target the wrong commit. ## Proposed fix - API: `createPullRequestReview(owner, repo, index, event, body, { commitId } = {})` - CLI: `stoke pr review … --commit <sha>` (optional) - Tests: assert the field is included only when set ## Acceptance - Omitting `--commit` preserves current behavior. - With `--commit`, the request JSON includes `commit_id`. ## Audit note Enhancement from full audit of stoke @ `92a6741`.
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: heavy-duty/stoke#11
No description provided.