next-issue 6.6.73 → 6.6.75
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/gate.mjs +13 -1
- package/dist/labels.mjs +1 -0
- 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/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/labels.mjs
CHANGED
|
@@ -24,6 +24,7 @@ export async function setLabel(repo, kind, number, add, remove) {
|
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
export async function ensureLabel(repo, label) {
|
|
27
|
+
KNOWN_LABELS.delete(repoArg(repo));
|
|
27
28
|
const created = await createUnknownLabel(repo, label);
|
|
28
29
|
if (created instanceof Error) {
|
|
29
30
|
KNOWN_LABELS.delete(repoArg(repo));
|