next-issue 17.2.4 → 17.2.6
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 +23 -23
- package/dist/shared/setup.mjs +27 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -52,29 +52,29 @@ npx -y next-issue@latest init
|
|
|
52
52
|
|
|
53
53
|
It writes `.next-issue/config.json` with the defaults, or keeps the file when it is there already, and installs the skills. A field that is not in the file keeps its default. See [Configuration](https://github.com/ravshansbox/next-issue/blob/main/packages/next-issue/docs/behaviour.md#configuration) for the details.
|
|
54
54
|
|
|
55
|
-
| Field | Default
|
|
56
|
-
| ----------------------- |
|
|
57
|
-
| `agentTimeoutMinutes` | `30`
|
|
58
|
-
| `checkGraceSeconds` | `60`
|
|
59
|
-
| `checkIntervalSeconds` | `15`
|
|
60
|
-
| `checkTimeoutMinutes` | `60`
|
|
61
|
-
| `checksTimeoutMinutes` | `30`
|
|
62
|
-
| `commandTimeoutMinutes` | `10`
|
|
63
|
-
| `concurrency` | `1`
|
|
64
|
-
| `diffMaxChars` | `60000`
|
|
65
|
-
| `huntCap` | `1`
|
|
66
|
-
| `ignoredChecks` | `[]`
|
|
67
|
-
| `issueLimit` | `100`
|
|
68
|
-
| `keepRunDays` | `7`
|
|
69
|
-
| `labels` | see the details
|
|
70
|
-
| `logMaxChars` | `20000`
|
|
71
|
-
| `maxCiFixes` | `5`
|
|
72
|
-
| `maxCommitFixes` | `10`
|
|
73
|
-
| `maxReviewRounds` | `5`
|
|
74
|
-
| `models` | `null` per role
|
|
75
|
-
| `remote` | `origin`
|
|
76
|
-
| `setupCommand` | from the lock file | A shell command that installs the dependencies in a worktree |
|
|
77
|
-
| `setupTimeoutMinutes` | `15`
|
|
55
|
+
| Field | Default | Effect |
|
|
56
|
+
| ----------------------- | ------------------------------------ | ------------------------------------------------------------------- |
|
|
57
|
+
| `agentTimeoutMinutes` | `30` | The limit for one agent call |
|
|
58
|
+
| `checkGraceSeconds` | `60` | The time to wait for checks to show on the base branch |
|
|
59
|
+
| `checkIntervalSeconds` | `15` | The time between two reads of the checks |
|
|
60
|
+
| `checkTimeoutMinutes` | `60` | The limit for one wait for the checks |
|
|
61
|
+
| `checksTimeoutMinutes` | `30` | The limit for one script of the local gate |
|
|
62
|
+
| `commandTimeoutMinutes` | `10` | The limit for one `git` or `gh` command |
|
|
63
|
+
| `concurrency` | `1` | The most issues that an agent works on at the same time |
|
|
64
|
+
| `diffMaxChars` | `60000` | The maximum length of the diff that the reviewer reads |
|
|
65
|
+
| `huntCap` | `1` | The number of waiting ready issues below which the hunter hunts |
|
|
66
|
+
| `ignoredChecks` | `[]` | Names of checks on the base branch that do not count |
|
|
67
|
+
| `issueLimit` | `100` | The most open issues to read, oldest first |
|
|
68
|
+
| `keepRunDays` | `7` | The number of days to keep the run files; `0` keeps them all |
|
|
69
|
+
| `labels` | see the details | The names of the labels that the harness reads and sets |
|
|
70
|
+
| `logMaxChars` | `20000` | The maximum length of the failed check logs for the fixer |
|
|
71
|
+
| `maxCiFixes` | `5` | The budget for check fixes per issue |
|
|
72
|
+
| `maxCommitFixes` | `10` | The budget for fixes of a commit that a git hook stopped, per issue |
|
|
73
|
+
| `maxReviewRounds` | `5` | The budget for review rounds per issue |
|
|
74
|
+
| `models` | `null` per role | The Claude model ID per agent role |
|
|
75
|
+
| `remote` | `origin` | The git remote for the repository and the branches |
|
|
76
|
+
| `setupCommand` | from the lock file or `package.json` | A shell command that installs the dependencies in a worktree |
|
|
77
|
+
| `setupTimeoutMinutes` | `15` | The limit for the setup command |
|
|
78
78
|
|
|
79
79
|
## Commands and options
|
|
80
80
|
|
package/dist/shared/setup.mjs
CHANGED
|
@@ -2,12 +2,14 @@ import { access } from 'node:fs/promises';
|
|
|
2
2
|
import { join } from 'node:path';
|
|
3
3
|
import { message, parseJson } from './errors.mjs';
|
|
4
4
|
import { readTextIfPresent } from './files.mjs';
|
|
5
|
-
const
|
|
5
|
+
const JS_MARKERS = [
|
|
6
6
|
['pnpm-lock.yaml', 'pnpm install --frozen-lockfile'],
|
|
7
7
|
['package-lock.json', 'npm ci'],
|
|
8
8
|
['yarn.lock', 'yarn install --frozen-lockfile'],
|
|
9
9
|
['bun.lock', 'bun install --frozen-lockfile'],
|
|
10
10
|
['bun.lockb', 'bun install --frozen-lockfile'],
|
|
11
|
+
];
|
|
12
|
+
const OTHER_MARKERS = [
|
|
11
13
|
['Cargo.lock', 'cargo fetch --locked'],
|
|
12
14
|
['go.sum', 'go mod download'],
|
|
13
15
|
['uv.lock', 'uv sync --locked'],
|
|
@@ -17,18 +19,34 @@ const MARKERS = [
|
|
|
17
19
|
function exists(path) {
|
|
18
20
|
return access(path).then(() => true, () => false);
|
|
19
21
|
}
|
|
20
|
-
|
|
21
|
-
for (const
|
|
22
|
-
if (
|
|
23
|
-
|
|
22
|
+
async function firstMatch(root, markers) {
|
|
23
|
+
for (const marker of markers) {
|
|
24
|
+
if (await exists(join(root, marker[0]))) {
|
|
25
|
+
return marker;
|
|
24
26
|
}
|
|
25
|
-
if (file === 'yarn.lock' && (await exists(join(root, '.yarnrc.yml')))) {
|
|
26
|
-
return 'yarn install --immutable';
|
|
27
|
-
}
|
|
28
|
-
return command;
|
|
29
27
|
}
|
|
30
28
|
return undefined;
|
|
31
29
|
}
|
|
30
|
+
async function jsLockCommand(root) {
|
|
31
|
+
const match = await firstMatch(root, JS_MARKERS);
|
|
32
|
+
if (match === undefined) {
|
|
33
|
+
return undefined;
|
|
34
|
+
}
|
|
35
|
+
const [file, command] = match;
|
|
36
|
+
if (file === 'yarn.lock' && (await exists(join(root, '.yarnrc.yml')))) {
|
|
37
|
+
return 'yarn install --immutable';
|
|
38
|
+
}
|
|
39
|
+
return command;
|
|
40
|
+
}
|
|
41
|
+
export async function detectSetupCommand(root) {
|
|
42
|
+
const jsCommand = await jsLockCommand(root);
|
|
43
|
+
const otherCommand = (await firstMatch(root, OTHER_MARKERS))?.[1];
|
|
44
|
+
const fallback = jsCommand === undefined && (await exists(join(root, 'package.json')))
|
|
45
|
+
? 'npm install --no-package-lock'
|
|
46
|
+
: undefined;
|
|
47
|
+
const commands = [jsCommand, otherCommand, fallback].filter((command) => command !== undefined);
|
|
48
|
+
return commands.length === 0 ? undefined : commands.join(' && ');
|
|
49
|
+
}
|
|
32
50
|
export const SCRIPTS = ['format', 'lint', 'typecheck', 'test'];
|
|
33
51
|
const RUNNERS = [
|
|
34
52
|
['pnpm-lock.yaml', 'pnpm run'],
|