next-issue 2.4.9 → 2.4.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/README.md +4 -1
- package/dist/git.mjs +6 -0
- package/dist/pipeline.mjs +9 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -41,7 +41,10 @@ and exits with code 1. For each issue:
|
|
|
41
41
|
fixes it, and the harness commits again. A `commit:` line in the reply of
|
|
42
42
|
the agent replaces the subject, so a hook that rejects the subject can pass.
|
|
43
43
|
The budget is `maxCommitFixes`. Any other git failure in the commit stops
|
|
44
|
-
the run with an error.
|
|
44
|
+
the run with an error. An implementer that makes no change hands the issue
|
|
45
|
+
to a person, unless the branch is already ahead of the base, for example
|
|
46
|
+
after the state file was lost: the run then carries on with the commits on
|
|
47
|
+
the branch, and the newest of them gives the title of the pull request.
|
|
45
48
|
5. Open a draft pull request that closes the issue. Its title is the subject
|
|
46
49
|
of the commit that starts it, so a squash merge gives a conventional
|
|
47
50
|
commit.
|
package/dist/git.mjs
CHANGED
|
@@ -157,6 +157,12 @@ export async function resetToBase(cwd, base, remote) {
|
|
|
157
157
|
await must('git', ['fetch', remote, base], { cwd });
|
|
158
158
|
await must('git', ['reset', '--hard', `${remote}/${base}`], { cwd });
|
|
159
159
|
}
|
|
160
|
+
export async function latestSubject(cwd, base, remote) {
|
|
161
|
+
const subject = await must('git', ['log', '-1', '--format=%s', `${remote}/${base}..HEAD`], {
|
|
162
|
+
cwd,
|
|
163
|
+
});
|
|
164
|
+
return subject === '' ? undefined : subject;
|
|
165
|
+
}
|
|
160
166
|
export async function revision(cwd) {
|
|
161
167
|
return must('git', ['rev-parse', 'HEAD'], { cwd });
|
|
162
168
|
}
|
package/dist/pipeline.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CODING, REVIEWING, runAgent } from './agents.mjs';
|
|
2
2
|
import { managedLabels } from './config.mjs';
|
|
3
3
|
import { run } from './exec.mjs';
|
|
4
|
-
import { addWorktree, branchName, commitAll, deleteBranch, diff, discardChanges, disputeBranches, findWorktree, HookError, isDirty, push, removeWorktree, resetToBase, revision, setAside, } from './git.mjs';
|
|
4
|
+
import { addWorktree, branchName, commitAll, deleteBranch, diff, discardChanges, disputeBranches, findWorktree, HookError, isDirty, latestSubject, push, removeWorktree, resetToBase, revision, setAside, } from './git.mjs';
|
|
5
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';
|
|
@@ -25,6 +25,7 @@ export const PORTS = {
|
|
|
25
25
|
findWorktree,
|
|
26
26
|
isDirty,
|
|
27
27
|
issueComments,
|
|
28
|
+
latestSubject,
|
|
28
29
|
markPrReady,
|
|
29
30
|
mergeCommit,
|
|
30
31
|
mergePr,
|
|
@@ -211,8 +212,13 @@ async function work(context, issue, log, state, start) {
|
|
|
211
212
|
}));
|
|
212
213
|
const subject = parseCommitSubject(result.text, `fix: resolve issue #${issue.number}`);
|
|
213
214
|
if (!(await commitWork(job, before, subject, 'implementer'))) {
|
|
214
|
-
await
|
|
215
|
-
|
|
215
|
+
const earlier = await ports.latestSubject(worktree, context.base, config.remote);
|
|
216
|
+
if (earlier === undefined) {
|
|
217
|
+
await escalate(job, 'The implementer produced no change.');
|
|
218
|
+
return finish(job, 'needs-human', 'no implementation commit');
|
|
219
|
+
}
|
|
220
|
+
log.event('implement.earlier', { subject: earlier }, 'quiet');
|
|
221
|
+
state.title = earlier;
|
|
216
222
|
}
|
|
217
223
|
state.phase = 'implemented';
|
|
218
224
|
await writeState(repo, state);
|