@jphutchins/code-review 0.1.0-alpha.62 → 0.1.0-alpha.64
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +575 -335
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/templates/comment.eta +13 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jphutchins/code-review",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.64",
|
|
4
4
|
"description": "Deterministic commenter for agentic PR review — gather, render, inline, post, adapt, extract, cost, validate, print-schema",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
package/templates/comment.eta
CHANGED
|
@@ -9,10 +9,15 @@
|
|
|
9
9
|
<% if (it.findingsPointer) { -%>
|
|
10
10
|
<%~ it.findingsPointer %>
|
|
11
11
|
<% } -%>
|
|
12
|
-
|
|
12
|
+
<% if (it.terminal) { -%>
|
|
13
|
+
<%~ it.terminalNotice %>
|
|
14
|
+
<% } else { -%>
|
|
13
15
|
## <%= it.verdictBadge(it.findings.verdict) %>
|
|
14
16
|
|
|
15
17
|
<% const meta = [] %><% if (it.postedAt) { meta.push('**Reviewed** `' + it.reviewedSha.slice(0, 7) + '` at ' + it.postedAt) } %><% if (it.route) { meta.push('**route:** ' + it.route) } %><% if (it.effort) { meta.push('**effort:** ' + it.effort) } %><% if (it.hasUsage) { meta.push('**turns:** ' + it.envelope.turns); meta.push('**wall:** ' + it.formatDuration(it.envelope.duration_ms)); meta.push('**models:** ' + it.modelNames); meta.push('**cost:** ' + it.formatCost(it.costReport.totalCostUSD, it.costProvenance)) } else { meta.push('_usage unavailable_') } %><sub><%~ meta.join(' · ') %></sub>
|
|
18
|
+
<% if (it.shedNote) { -%>
|
|
19
|
+
<%~ it.shedNote %>
|
|
20
|
+
<% } -%>
|
|
16
21
|
<% if (!it.incomplete) { -%>
|
|
17
22
|
<% if (it.roundsSummary) { -%>
|
|
18
23
|
<sub><%~ it.roundsSummary %></sub>
|
|
@@ -93,9 +98,13 @@
|
|
|
93
98
|
<% if (it.inlineDisposition && it.inlineDisposition.kind === 'posted') { %>
|
|
94
99
|
→ <%= it.inlineDisposition.count %> comment<%= it.inlineDisposition.count === 1 ? '' : 's' %> posted inline on `<%= it.inlineDisposition.sha.slice(0, 7) %>`<% if (it.reviewUrl) { %> — [see the review](<%~ it.reviewUrl %>)<% } %>.
|
|
95
100
|
<% } else if (it.inlineDisposition && it.inlineDisposition.kind === 'none-in-diff') { %>
|
|
101
|
+
<% if (it.shedCount === 0) { %>
|
|
96
102
|
→ No inline comments — all findings are outside the diff (listed below).
|
|
103
|
+
<% } -%>
|
|
97
104
|
<% } else if (it.inlineDisposition && it.inlineDisposition.kind === 'inline-unavailable') { %>
|
|
105
|
+
<% if (it.shedCount === 0) { %>
|
|
98
106
|
→ ⚠️ Inline comments couldn't be posted for this review (GitHub rejected a comment's position) — every finding is listed below instead.
|
|
107
|
+
<% } -%>
|
|
99
108
|
<% } else if (it.inlineDisposition && it.inlineDisposition.kind === 'whole-document') { %>
|
|
100
109
|
→ This run's <%= it.incomplete ? 'review record' : 'complete review' %><% if (it.reviewUrl) { %> — [see the review](<%~ it.reviewUrl %>)<% } %>.
|
|
101
110
|
<% } %>
|
|
@@ -103,7 +112,9 @@
|
|
|
103
112
|
<% if (it.strays.length > 0) { %>
|
|
104
113
|
## <% if (it.inlineDisposition && (it.inlineDisposition.kind === 'disabled' || it.inlineDisposition.kind === 'whole-document')) { %>Findings<% } else if (it.inlineDisposition && it.inlineDisposition.kind === 'no-envelope') { %>Findings (no inline review — result envelope lost)<% } else { %><%= (it.unanchoredCount && it.unanchoredCount > 0) ? 'Findings' : 'Findings outside the diff' %><% } %>
|
|
105
114
|
<% if (it.inlineDisposition && it.inlineDisposition.kind === 'no-envelope') { %>
|
|
115
|
+
<% if (it.shedCount === 0) { %>
|
|
106
116
|
_Every finding is listed below — the inline review could not be built because the result envelope was missing._
|
|
117
|
+
<% } -%>
|
|
107
118
|
<% } else if (it.inlineDisposition && it.inlineDisposition.kind === 'whole-document') { %>
|
|
108
119
|
_Every finding from this run<% if (it.inlineDisposition.inlineCount > 0) { %>, including the <%= it.inlineDisposition.inlineCount %> posted as inline comment<%= it.inlineDisposition.inlineCount === 1 ? '' : 's' %> on the diff<% } %><% if (it.inlineDisposition.rejectedCount > 0) { %>; <%= it.inlineDisposition.rejectedCount %> could not be anchored (GitHub rejected the position)<% } %>._
|
|
109
120
|
<% } else if (it.unanchoredCount && it.unanchoredCount > 0) { %>
|
|
@@ -253,3 +264,4 @@ All <%= it.testReport.total %> tests passed.
|
|
|
253
264
|
<% } -%>
|
|
254
265
|
>
|
|
255
266
|
> _Generated by [code-review](https://github.com/JPHutchins/code-review)<% if (it.runUrl) { %> · [view the run & traces](<%~ it.runUrl %>)<% } %>._
|
|
267
|
+
<% } -%>
|