next-issue 2.4.7 → 2.4.8
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/README.md +4 -3
- package/dist/github.mjs +3 -0
- package/dist/pipeline.mjs +8 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -100,7 +100,8 @@ and exits with code 1. For each issue:
|
|
|
100
100
|
## Stops for a loop
|
|
101
101
|
|
|
102
102
|
The harness hands the issue to a person, with the `status:needs-human` label,
|
|
103
|
-
when
|
|
103
|
+
and comments the reason on the pull request, or on the issue when there is no
|
|
104
|
+
pull request yet, when:
|
|
104
105
|
|
|
105
106
|
- the check budget or the review budget runs out;
|
|
106
107
|
- a fixer round adds no commit and gives no reason, so there is no progress;
|
|
@@ -135,8 +136,8 @@ when:
|
|
|
135
136
|
- the setup command fails, or does not finish in `setupTimeoutMinutes`;
|
|
136
137
|
- a step of the run fails with an error. A `gh` call that is safe to repeat,
|
|
137
138
|
such as a read or a label edit, is tried up to three times first when the
|
|
138
|
-
network fails. A `gh pr create
|
|
139
|
-
reply never makes a duplicate.
|
|
139
|
+
network fails. A `gh pr create`, `gh pr comment` or `gh issue comment` is
|
|
140
|
+
tried once, so a lost reply never makes a duplicate.
|
|
140
141
|
|
|
141
142
|
The fixer sees the findings of all earlier rounds, not only the last one, with
|
|
142
143
|
its own disputes next to them. From round two, the reviewer judges only the
|
package/dist/github.mjs
CHANGED
|
@@ -363,6 +363,9 @@ export async function mergeCommit(repo, pr, options, clock = REAL_CLOCK) {
|
|
|
363
363
|
export async function reopenIssue(repo, issue) {
|
|
364
364
|
await gh(repo, ['issue', 'reopen', String(issue)]);
|
|
365
365
|
}
|
|
366
|
+
export async function commentOnIssue(repo, issue, body) {
|
|
367
|
+
await ghOnce(repo, ['issue', 'comment', String(issue), '--body-file', '-'], body);
|
|
368
|
+
}
|
|
366
369
|
export async function commentOnPr(repo, pr, body) {
|
|
367
370
|
await ghOnce(repo, ['pr', 'comment', String(pr), '--body-file', '-'], body);
|
|
368
371
|
}
|
package/dist/pipeline.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { CODING, REVIEWING, runAgent } from './agents.mjs';
|
|
|
2
2
|
import { managedLabels } from './config.mjs';
|
|
3
3
|
import { run } from './exec.mjs';
|
|
4
4
|
import { addWorktree, branchName, commitAll, deleteBranch, diff, discardChanges, disputeBranches, findWorktree, HookError, isDirty, push, removeWorktree, resetToBase, revision, setAside, } from './git.mjs';
|
|
5
|
-
import { commentOnPr, createPr, failedBaseLogs, failedCheckLogs, findPr, issueComments, markPrReady, mergeCommit, mergePr, openBlockers, openIssues, prConflicts, prMerged, reopenIssue, setLabel, viewIssue, waitForBaseChecks, waitForChecks, } from './github.mjs';
|
|
5
|
+
import { commentOnIssue, commentOnPr, createPr, failedBaseLogs, failedCheckLogs, findPr, issueComments, markPrReady, mergeCommit, mergePr, openBlockers, openIssues, prConflicts, prMerged, reopenIssue, setLabel, viewIssue, waitForBaseChecks, waitForChecks, } from './github.mjs';
|
|
6
6
|
import { message } from './observe.mjs';
|
|
7
7
|
import { capDiff, fixPrompt, hookPrompt, implementPrompt, parseCommitSubject, parseUnrelated, reviewPrompt, } from './prompts.mjs';
|
|
8
8
|
import { detectSetupCommand } from './setup.mjs';
|
|
@@ -10,6 +10,7 @@ import { dropState, readState, resetState, savedIssues, writeState, } from './st
|
|
|
10
10
|
import { blockingFindings, fingerprint, formatFindings, formatVerdict, openFindings, readVerdict, VERDICT_SCHEMA, } from './verdict.mjs';
|
|
11
11
|
export const PORTS = {
|
|
12
12
|
addWorktree,
|
|
13
|
+
commentOnIssue,
|
|
13
14
|
commentOnPr,
|
|
14
15
|
commitAll,
|
|
15
16
|
createPr,
|
|
@@ -616,8 +617,12 @@ async function handOver(context, log, issue, state, reason) {
|
|
|
616
617
|
log.event('hand-over', { reason }, 'quiet');
|
|
617
618
|
await writeState(context.repo, state);
|
|
618
619
|
await setStatus(context, issue, state.pr, context.config.labels.needsHuman);
|
|
619
|
-
|
|
620
|
-
|
|
620
|
+
const body = `next-issue needs help: ${reason}`;
|
|
621
|
+
if (state.pr === undefined) {
|
|
622
|
+
await context.ports.commentOnIssue(context.repo, issue, body);
|
|
623
|
+
}
|
|
624
|
+
else {
|
|
625
|
+
await context.ports.commentOnPr(context.repo, state.pr, body);
|
|
621
626
|
}
|
|
622
627
|
}
|
|
623
628
|
async function setStatus(context, issue, pr, label) {
|