next-issue 6.6.20 → 6.6.21
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/gate.mjs +14 -2
- package/package.json +1 -1
package/dist/gate.mjs
CHANGED
|
@@ -9,7 +9,16 @@ import { revertOrReport, sentence } from './revert.mjs';
|
|
|
9
9
|
import { writeState } from './state.mjs';
|
|
10
10
|
export async function checkGate(job, sha) {
|
|
11
11
|
const { base } = job.context;
|
|
12
|
-
|
|
12
|
+
let checks;
|
|
13
|
+
try {
|
|
14
|
+
checks = await rerunOnce(job, sha, await waitForChecks(job, sha));
|
|
15
|
+
}
|
|
16
|
+
catch (error) {
|
|
17
|
+
if (!job.mainBroken) {
|
|
18
|
+
throw error;
|
|
19
|
+
}
|
|
20
|
+
return escalateError(job, error, `The read of the checks on ${base} failed`, 'checks error');
|
|
21
|
+
}
|
|
13
22
|
if (checks === 'pass' || checks === 'none') {
|
|
14
23
|
return GATE_PASSED;
|
|
15
24
|
}
|
|
@@ -41,7 +50,10 @@ async function rerunOnce(job, sha, checks) {
|
|
|
41
50
|
log.event('main-checks.rerun-failed', { sha, error: asError(error).message });
|
|
42
51
|
return checks;
|
|
43
52
|
}
|
|
44
|
-
return waitForChecks(job, sha, { rerun: true })
|
|
53
|
+
return waitForChecks(job, sha, { rerun: true }).catch((error) => {
|
|
54
|
+
job.mainBroken = true;
|
|
55
|
+
throw error;
|
|
56
|
+
});
|
|
45
57
|
}
|
|
46
58
|
async function failedChecksFix(job, sha) {
|
|
47
59
|
const { context, log, state } = job;
|