Commit 180e705
authored
feat(review): opt-in --post publishes PR reviews with inline comments (#64)
When `/opencode:review --pr N --post` or `/opencode:adversarial-review
--pr N --post` runs, the companion now publishes the review back to
the GitHub PR as a review comment:
- The summary body is a structured markdown block: verdict badge,
model, a findings table (severity / confidence / file / lines /
title), and a collapsible "Full findings" section with body +
recommendation per finding.
- Findings with confidence at or above `--confidence-threshold`
(default 0.8, configurable as a float or percent) whose line is
addressable on the PR's unified diff are posted as inline review
comments anchored to that specific line. Findings below the
threshold or outside the diff stay in the summary table only.
- Reviews are always published with `event: "COMMENT"` — never
`REQUEST_CHANGES` — because this tool is advisory.
- Posting failures are non-fatal: the local review output is already
on stdout, so a network or auth glitch on GitHub logs a warning to
stderr instead of flipping the whole run to a non-zero exit.
Opt-in was the explicit design choice: anyone already using
`--pr N` for private sanity checks should not get surprise public
comments, and `--post` is easy to add to muscle memory.
Also relax the 7-second body-stall assertion in
send-prompt-body-timeout.test.mjs — the deepEqual already proves the
code path survives the stall, and the timing bound flaked under WSL2
clock skew.1 parent c075702 commit 180e705
File tree
6 files changed
+1048
-13
lines changed- plugins/opencode
- commands
- scripts
- lib
- tests
6 files changed
+1048
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
43 | 45 | | |
44 | 46 | | |
45 | 47 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
45 | 47 | | |
46 | 48 | | |
47 | 49 | | |
| |||
0 commit comments