next-issue 17.2.9 → 17.2.10
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/worker/review.mjs +11 -8
- package/package.json +1 -1
package/dist/worker/review.mjs
CHANGED
|
@@ -18,18 +18,21 @@ export async function reviewRound(job) {
|
|
|
18
18
|
return exhausted;
|
|
19
19
|
}
|
|
20
20
|
const earlier = history(state.reviewLog);
|
|
21
|
-
const
|
|
21
|
+
const open = await refundIfCut(job, 'reviewRounds', async () => {
|
|
22
22
|
await setStatus(context, issue.number, config.labels.inReview);
|
|
23
|
-
|
|
23
|
+
const verdict = parseVerdict(await runReviewer(job, earlier));
|
|
24
|
+
if (verdict === undefined) {
|
|
25
|
+
return undefined;
|
|
26
|
+
}
|
|
27
|
+
const { round, limit } = budgetUse(job, 'reviewRounds');
|
|
28
|
+
const findings = openFindings(verdict, round >= limit);
|
|
29
|
+
recordVerdict(job, verdict, findings);
|
|
30
|
+
await ports.commentOnIssue(repo, issue.number, fitComment(formatVerdict(verdict, findings), COMMENT_CUT));
|
|
31
|
+
return findings;
|
|
24
32
|
});
|
|
25
|
-
|
|
26
|
-
if (verdict === undefined) {
|
|
33
|
+
if (open === undefined) {
|
|
27
34
|
return escalateAndFinish(job, 'The reviewer gave no verdict.', 'no verdict');
|
|
28
35
|
}
|
|
29
|
-
const { round, limit } = budgetUse(job, 'reviewRounds');
|
|
30
|
-
const open = openFindings(verdict, round >= limit);
|
|
31
|
-
recordVerdict(job, verdict, open);
|
|
32
|
-
await ports.commentOnIssue(repo, issue.number, fitComment(formatVerdict(verdict, open), COMMENT_CUT));
|
|
33
36
|
if (open.length === 0) {
|
|
34
37
|
state.phase = 'approved';
|
|
35
38
|
await writeState(repo, state);
|