next-issue 6.6.74 → 6.6.76
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/base-checks.mjs +2 -1
- package/dist/enter-review.mjs +2 -2
- package/dist/gate.mjs +13 -1
- package/dist/revert.mjs +6 -1
- package/package.json +1 -1
package/dist/base-checks.mjs
CHANGED
|
@@ -66,11 +66,12 @@ export function waitForBaseChecks(repo, sha, options) {
|
|
|
66
66
|
watch: async () => baseState(checks),
|
|
67
67
|
}, options);
|
|
68
68
|
}
|
|
69
|
-
export async function rerunFailedBase(repo, sha) {
|
|
69
|
+
export async function rerunFailedBase(repo, sha, started = () => { }) {
|
|
70
70
|
const failed = (await baseRuns(repo, sha)).filter(failedRun);
|
|
71
71
|
for (const entry of failed) {
|
|
72
72
|
await gh(repo, ['run', 'rerun', String(entry.databaseId), '--failed']);
|
|
73
73
|
}
|
|
74
|
+
started();
|
|
74
75
|
await waitForRestart(repo, sha, failed);
|
|
75
76
|
return failed.map((entry) => String(entry.databaseId));
|
|
76
77
|
}
|
package/dist/enter-review.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { escalateAndFinish } from './handover.mjs';
|
|
2
2
|
import { ROUND_CONTINUE } from './job.mjs';
|
|
3
3
|
import { landApproved, resumeLanding } from './land.mjs';
|
|
4
|
-
import { reapplyMessage } from './revert.mjs';
|
|
4
|
+
import { reapplyMessage, restoreChange } from './revert.mjs';
|
|
5
5
|
import { writeState } from './state.mjs';
|
|
6
6
|
export async function enterReview(job) {
|
|
7
7
|
const { context, state } = job;
|
|
@@ -66,7 +66,7 @@ async function settleRevert(job) {
|
|
|
66
66
|
reverted: sha,
|
|
67
67
|
reapply: reapplyMessage(job),
|
|
68
68
|
});
|
|
69
|
-
state
|
|
69
|
+
restoreChange(state);
|
|
70
70
|
}
|
|
71
71
|
state.reverting = undefined;
|
|
72
72
|
await writeState(repo, state);
|
package/dist/gate.mjs
CHANGED
|
@@ -43,13 +43,25 @@ async function rerunOnce(job, sha, checks) {
|
|
|
43
43
|
if (checks !== 'fail' || state.rerun === sha) {
|
|
44
44
|
return checks;
|
|
45
45
|
}
|
|
46
|
+
const before = state.rerun;
|
|
46
47
|
state.rerun = sha;
|
|
47
48
|
await writeState(context.repo, state);
|
|
49
|
+
let started = false;
|
|
48
50
|
try {
|
|
49
|
-
const runs = await context.ports.rerunFailedBase(context.repo, sha)
|
|
51
|
+
const runs = await context.ports.rerunFailedBase(context.repo, sha, () => {
|
|
52
|
+
started = true;
|
|
53
|
+
});
|
|
50
54
|
log.event('main-checks.rerun', { sha, runs });
|
|
51
55
|
}
|
|
52
56
|
catch (error) {
|
|
57
|
+
if (runStopped()) {
|
|
58
|
+
if (started) {
|
|
59
|
+
throw error;
|
|
60
|
+
}
|
|
61
|
+
state.rerun = before;
|
|
62
|
+
await writeState(context.repo, state);
|
|
63
|
+
throw error;
|
|
64
|
+
}
|
|
53
65
|
log.event('main-checks.rerun-failed', { sha, error: asError(error).message });
|
|
54
66
|
return checks;
|
|
55
67
|
}
|
package/dist/revert.mjs
CHANGED
|
@@ -27,6 +27,11 @@ export function reapplyMessage(job) {
|
|
|
27
27
|
const { number } = job.issue;
|
|
28
28
|
return `${job.state.changeTitle ?? job.state.title ?? `fix: resolve issue #${number}`}\n\nRefs #${number}`;
|
|
29
29
|
}
|
|
30
|
+
export function restoreChange(state) {
|
|
31
|
+
state.landed = undefined;
|
|
32
|
+
state.title = state.changeTitle ?? state.title;
|
|
33
|
+
state.changeTitle = undefined;
|
|
34
|
+
}
|
|
30
35
|
export async function revert(job) {
|
|
31
36
|
const { context, issue, log, state, branch, worktree } = job;
|
|
32
37
|
const { repo, config, ports, base } = context;
|
|
@@ -48,7 +53,7 @@ export async function revert(job) {
|
|
|
48
53
|
await writeState(repo, state);
|
|
49
54
|
return ` The revert of the change on ${base} failed, so the landed commits stay on ${base}.`;
|
|
50
55
|
}
|
|
51
|
-
state
|
|
56
|
+
restoreChange(state);
|
|
52
57
|
await writeState(repo, state);
|
|
53
58
|
return ` The harness reverted the change on ${base}.`;
|
|
54
59
|
}
|