next-issue 6.6.11 → 6.6.13
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 +3 -1
- package/dist/gate.mjs +2 -2
- package/dist/git-land.mjs +4 -3
- package/dist/land.mjs +7 -3
- package/dist/revert.mjs +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -135,7 +135,9 @@ the run handles one issue. For each issue:
|
|
|
135
135
|
commit of the change on the base branch, pushes the revert and hands the
|
|
136
136
|
issue to a person. A revert
|
|
137
137
|
push that the remote refuses, for example because the base moved, makes
|
|
138
|
-
the revert again on the new base, three times at most. A
|
|
138
|
+
the revert again on the new base, three times at most. A failed revert
|
|
139
|
+
push that the base holds after a fetch counts as landed, and a fetch that
|
|
140
|
+
fails leaves the revert reported as failed. A resume
|
|
139
141
|
that stopped while the checks of a landed commit ran waits for them
|
|
140
142
|
again, even when more commits landed on the base since, and a fix that
|
|
141
143
|
was committed but not landed lands first. A problem that the reviewer
|
package/dist/gate.mjs
CHANGED
|
@@ -75,7 +75,7 @@ async function failedChecksFix(job, sha) {
|
|
|
75
75
|
job.repairing = true;
|
|
76
76
|
return GATE_FIXED;
|
|
77
77
|
}
|
|
78
|
-
async function escalateError(job, error, note, reason) {
|
|
78
|
+
export async function escalateError(job, error, note, reason) {
|
|
79
79
|
if (runStopped()) {
|
|
80
80
|
throw error;
|
|
81
81
|
}
|
|
@@ -91,7 +91,7 @@ async function revertOrReport(job) {
|
|
|
91
91
|
throw error;
|
|
92
92
|
}
|
|
93
93
|
job.repairing = false;
|
|
94
|
-
return ` The revert of the change on ${job.context.base} failed: ${sentence(message(error))}
|
|
94
|
+
return ` The revert of the change on ${job.context.base} failed: ${sentence(message(error))} The landed commits stay on ${job.context.base}.`;
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
function sentence(text) {
|
package/dist/git-land.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { fetchBase, git, oneFetchAtATime, remoteRef, revision, succeeds } from './git.mjs';
|
|
1
|
+
import { fetchBase, git, isOnBase, oneFetchAtATime, remoteRef, revision, succeeds, } from './git.mjs';
|
|
2
2
|
import { commitEverything } from './git-commit.mjs';
|
|
3
3
|
export const PUSH_TRIES = 3;
|
|
4
4
|
export async function squashOnto(cwd, base, remote, message) {
|
|
@@ -44,8 +44,9 @@ async function pushRevert(cwd, revert) {
|
|
|
44
44
|
return false;
|
|
45
45
|
}
|
|
46
46
|
await git(cwd, ['commit', '--no-verify', '-m', message]);
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
const reverted = await revision(cwd);
|
|
48
|
+
if ((await pushToBase(cwd, remote, base)) || (await isOnBase(cwd, base, remote, reverted))) {
|
|
49
|
+
await git(cwd, ['revert', '--no-commit', reverted]);
|
|
49
50
|
await git(cwd, ['commit', '--no-verify', '-m', reapply]);
|
|
50
51
|
await git(cwd, ['checkout', '-B', branch]);
|
|
51
52
|
return true;
|
package/dist/land.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { runStopped } from './children.mjs';
|
|
2
2
|
import { rebase } from './conflict.mjs';
|
|
3
|
-
import { checkGate } from './gate.mjs';
|
|
3
|
+
import { checkGate, escalateError } from './gate.mjs';
|
|
4
4
|
import { PUSH_TRIES } from './git-land.mjs';
|
|
5
5
|
import { escalateAndFinish, finishDone } from './handover.mjs';
|
|
6
6
|
import { oneAtATime } from './lock.mjs';
|
|
@@ -37,8 +37,12 @@ function landing(job, work) {
|
|
|
37
37
|
async function landLoop(job) {
|
|
38
38
|
for (;;) {
|
|
39
39
|
const pushed = await pushChange(job).catch(async (error) => {
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
if (!job.repairing || runStopped()) {
|
|
41
|
+
await revertFailedFix(job);
|
|
42
|
+
throw error;
|
|
43
|
+
}
|
|
44
|
+
job.repairing = false;
|
|
45
|
+
return escalateError(job, error, `The landing of the fix for the checks on ${job.context.base} failed`, 'fix landing error');
|
|
42
46
|
});
|
|
43
47
|
if (typeof pushed !== 'string') {
|
|
44
48
|
return pushed;
|
package/dist/revert.mjs
CHANGED
|
@@ -19,7 +19,7 @@ export async function revert(job) {
|
|
|
19
19
|
reapply: `${state.title ?? `fix: resolve issue #${issue.number}`}\n\nRefs #${issue.number}`,
|
|
20
20
|
}));
|
|
21
21
|
if (!pushed) {
|
|
22
|
-
return ` The revert of the change on ${base} failed.`;
|
|
22
|
+
return ` The revert of the change on ${base} failed, so the landed commits stay on ${base}.`;
|
|
23
23
|
}
|
|
24
24
|
state.landed = undefined;
|
|
25
25
|
await writeState(repo, state);
|