next-issue 6.6.24 → 6.6.25
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/children.mjs +3 -0
- package/dist/fix.mjs +5 -3
- package/dist/git-land.mjs +2 -1
- package/package.json +1 -1
package/dist/children.mjs
CHANGED
|
@@ -28,6 +28,9 @@ export function stopRunChildren(children) {
|
|
|
28
28
|
export function runStopped() {
|
|
29
29
|
return current.getStore()?.stopped === true;
|
|
30
30
|
}
|
|
31
|
+
export function evenWhenStopped(body) {
|
|
32
|
+
return current.run(runChildren(), body);
|
|
33
|
+
}
|
|
31
34
|
export function refuseWhenStopped() {
|
|
32
35
|
if (runStopped()) {
|
|
33
36
|
throw new Error('The run stopped.');
|
package/dist/fix.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { parseCommitSubject, parseResolved, parseUnrelated, withoutClosingReferences, } from './agent-reply.mjs';
|
|
2
2
|
import { CODING } from './agents.mjs';
|
|
3
3
|
import { budgetUse } from './budget.mjs';
|
|
4
|
+
import { runStopped } from './children.mjs';
|
|
4
5
|
import { message } from './errors.mjs';
|
|
5
6
|
import { HookError } from './git-commit.mjs';
|
|
6
7
|
import { escalateAndFinish } from './handover.mjs';
|
|
@@ -67,10 +68,11 @@ export async function commitWork(job, before, subject, role, commit) {
|
|
|
67
68
|
for (;;) {
|
|
68
69
|
subject = withoutClosingReferences(subject, fallbackTitle(issue));
|
|
69
70
|
try {
|
|
70
|
-
|
|
71
|
+
const committed = await commitChanges(worktree, `${subject}\n\nRefs #${issue.number}`);
|
|
72
|
+
if (committed) {
|
|
71
73
|
log.event('commit', { subject });
|
|
72
74
|
}
|
|
73
|
-
if ((await ports.revision(worktree)) === before) {
|
|
75
|
+
if (!committed && (await ports.revision(worktree)) === before) {
|
|
74
76
|
return false;
|
|
75
77
|
}
|
|
76
78
|
state.title = subject;
|
|
@@ -85,7 +87,7 @@ async function hookFix(job, error, subject, role) {
|
|
|
85
87
|
const { context, issue, log, state, comments } = job;
|
|
86
88
|
const { repo, config } = context;
|
|
87
89
|
const used = state.commitFixes ?? 0;
|
|
88
|
-
if (!(error instanceof HookError) || used >= config.maxCommitFixes) {
|
|
90
|
+
if (!(error instanceof HookError) || runStopped() || used >= config.maxCommitFixes) {
|
|
89
91
|
throw error;
|
|
90
92
|
}
|
|
91
93
|
state.commitFixes = used + 1;
|
package/dist/git-land.mjs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { evenWhenStopped } from './children.mjs';
|
|
1
2
|
import { fetchBase, git, isOnBase, oneFetchAtATime, remoteRef, revision, succeeds, } from './git.mjs';
|
|
2
3
|
import { commitEverything } from './git-commit.mjs';
|
|
3
4
|
export const PUSH_TRIES = 3;
|
|
@@ -12,7 +13,7 @@ export async function squashOnto(cwd, base, remote, message) {
|
|
|
12
13
|
await commitEverything(cwd, message);
|
|
13
14
|
}
|
|
14
15
|
catch (error) {
|
|
15
|
-
await git(cwd, ['reset', '--soft', head]);
|
|
16
|
+
await evenWhenStopped(() => git(cwd, ['reset', '--soft', head]));
|
|
16
17
|
throw error;
|
|
17
18
|
}
|
|
18
19
|
return true;
|