next-issue 7.8.17 → 7.8.19
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 +5 -2
- package/dist/revert.mjs +8 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -278,7 +278,9 @@ the run handles one issue. For each issue:
|
|
|
278
278
|
lands the same way. When the fixer cannot fix them, its fix cannot land,
|
|
279
279
|
an error stops the fix, or the budget runs out, the harness reverts every
|
|
280
280
|
commit of the change on the base branch, pushes the revert and hands the
|
|
281
|
-
issue to a person.
|
|
281
|
+
issue to a person. When the push of the fix ends as `push unknown`, the
|
|
282
|
+
harness does not revert: it hands the issue over and halts as for any
|
|
283
|
+
other `push unknown`. A revert
|
|
282
284
|
push that the remote refuses, for example because the base moved, makes
|
|
283
285
|
the revert again on the new base, three times at most. A failed revert
|
|
284
286
|
push that the base holds after a fetch counts as landed. When that fetch
|
|
@@ -404,7 +406,8 @@ it, with checks nobody awaited (`checks error`, `push unknown`,
|
|
|
404
406
|
`main checks timeout`, `main checks cancelled`, an error or a failed setup
|
|
405
407
|
on such a resume before the base is checked, or a stop or kill while the run
|
|
406
408
|
pushes a change to the base, waits for the checks of a commit it landed, or
|
|
407
|
-
fixes the failed checks of that commit before the fix lands
|
|
409
|
+
fixes the failed checks of that commit before the fix lands or the revert of
|
|
410
|
+
that commit ends) is
|
|
408
411
|
saved in the state file of its issue. A stopped issue resumes in the next
|
|
409
412
|
run; any other waits for a person, so later runs skip it. Either way, no
|
|
410
413
|
later run lands another change meanwhile: an issue that reaches the landing
|
package/dist/revert.mjs
CHANGED
|
@@ -3,20 +3,24 @@ import { message } from './errors.mjs';
|
|
|
3
3
|
import { writeState } from './state.mjs';
|
|
4
4
|
import { HALT_NOTE, releaseSettled } from './unsettled.mjs';
|
|
5
5
|
export async function revertFailedFix(job) {
|
|
6
|
-
if (!job.repairing || (job.state.landed ?? []).length === 0) {
|
|
6
|
+
if (!job.repairing || job.state.pushing !== undefined || (job.state.landed ?? []).length === 0) {
|
|
7
7
|
return '';
|
|
8
8
|
}
|
|
9
9
|
job.repairing = false;
|
|
10
10
|
return revertFailedChecks(job);
|
|
11
11
|
}
|
|
12
|
-
/** Hands over a fix of failed checks; with no stop, its saved halt gives way, so the run halt alone holds back other landings. */
|
|
12
|
+
/** Hands over a fix of failed checks; once the revert ends with no stop, its saved halt gives way, so the run halt alone holds back other landings. */
|
|
13
13
|
export async function revertFailedChecks(job) {
|
|
14
|
+
const reverted = await revertOrReport(job);
|
|
14
15
|
const { context, state } = job;
|
|
15
|
-
if (state.halted === true &&
|
|
16
|
+
if (state.halted === true &&
|
|
17
|
+
state.pushing === undefined &&
|
|
18
|
+
state.reverting === undefined &&
|
|
19
|
+
!runStopped()) {
|
|
16
20
|
delete state.halted;
|
|
17
21
|
await writeState(context.repo, state);
|
|
18
22
|
}
|
|
19
|
-
return
|
|
23
|
+
return reverted;
|
|
20
24
|
}
|
|
21
25
|
export async function revertOrReport(job) {
|
|
22
26
|
try {
|