next-issue 6.6.19 → 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 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
- const checks = await rerunOnce(job, sha, await waitForChecks(job, sha));
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;
package/dist/setup.mjs CHANGED
@@ -3,7 +3,6 @@ import { join } from 'node:path';
3
3
  const MARKERS = [
4
4
  ['pnpm-lock.yaml', 'pnpm install --frozen-lockfile'],
5
5
  ['package-lock.json', 'npm ci'],
6
- ['.yarnrc.yml', 'yarn install --immutable'],
7
6
  ['yarn.lock', 'yarn install --frozen-lockfile'],
8
7
  ['bun.lock', 'bun install --frozen-lockfile'],
9
8
  ['bun.lockb', 'bun install --frozen-lockfile'],
@@ -13,12 +12,18 @@ const MARKERS = [
13
12
  ['poetry.lock', 'poetry install'],
14
13
  ['Gemfile.lock', 'bundle install'],
15
14
  ];
15
+ function exists(path) {
16
+ return access(path).then(() => true, () => false);
17
+ }
16
18
  export async function detectSetupCommand(root) {
17
19
  for (const [file, command] of MARKERS) {
18
- const found = await access(join(root, file)).then(() => true, () => false);
19
- if (found) {
20
- return command;
20
+ if (!(await exists(join(root, file)))) {
21
+ continue;
22
+ }
23
+ if (file === 'yarn.lock' && (await exists(join(root, '.yarnrc.yml')))) {
24
+ return 'yarn install --immutable';
21
25
  }
26
+ return command;
22
27
  }
23
28
  return undefined;
24
29
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-issue",
3
- "version": "6.6.19",
3
+ "version": "6.6.21",
4
4
  "description": "Autonomous issue harness driven by the pi SDK",
5
5
  "keywords": [
6
6
  "github",