next-issue 6.6.37 → 6.6.39
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 +8 -5
- package/dist/git.mjs +4 -1
- package/dist/setup.mjs +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -39,6 +39,8 @@ writes the summary of the issues it handled and exits with code 1.
|
|
|
39
39
|
|
|
40
40
|
Only one run goes at a time in a repository. A run holds `.next-issue/run.lock`, with its process id and the start time of that process, from its start to its end, and the worker takes the same lock for each run it starts. A run that starts while another run, from the worker or from the command line, is going claims no issue and fails at once with an error that names the other run and its process id (a command-line run exits with code 1, and a run started from the worker ends with status `failed` and the error text): `the worker (process id <n>) has a run going in this repository` or `another next-issue run (process id <n>) is going in this repository`. A lock whose process is gone, or started at another time, is stale and taken over, as with the worker lock.
|
|
41
41
|
|
|
42
|
+
Every command uses the main worktree of the repository as its root, the first one that `git worktree list` shows, even when it runs in a linked worktree. So `.next-issue/`, with the config, the locks, the worker socket, the saved state and the notes, and `.worktrees/` are always in the main worktree, and a run or worker started from a linked worktree gets the same refusal as one started from the main worktree.
|
|
43
|
+
|
|
42
44
|
A run handles up to `concurrency` issues at the same time, 1 by default. When an
|
|
43
45
|
issue ends, the run fetches the open issues again and claims the oldest unseen
|
|
44
46
|
one for the free slot. Each issue has its own worktree and branch. Step 3 below
|
|
@@ -369,7 +371,7 @@ To write the file with the defaults, run the `init` command in the repository:
|
|
|
369
371
|
npx -y next-issue@latest init
|
|
370
372
|
```
|
|
371
373
|
|
|
372
|
-
The command writes `.next-issue/config.json` in the
|
|
374
|
+
The command writes `.next-issue/config.json` in the main worktree and adds
|
|
373
375
|
`.next-issue/` and `.worktrees/` to `info/exclude` in the git directory, which
|
|
374
376
|
linked worktrees share. It removes those two lines from `.gitignore`, and
|
|
375
377
|
deletes `.gitignore` when nothing else is left in it. It moves a
|
|
@@ -464,17 +466,18 @@ and runs the install command that goes with it:
|
|
|
464
466
|
| `package-lock.json` | `npm ci` |
|
|
465
467
|
| `yarn.lock` | `yarn install --frozen-lockfile`, or `yarn install --immutable` with a `.yarnrc.yml` |
|
|
466
468
|
| `bun.lock`, `bun.lockb` | `bun install --frozen-lockfile` |
|
|
467
|
-
| `Cargo.lock` | `cargo fetch`
|
|
469
|
+
| `Cargo.lock` | `cargo fetch --locked` |
|
|
468
470
|
| `go.sum` | `go mod download` |
|
|
469
|
-
| `uv.lock` | `uv sync`
|
|
471
|
+
| `uv.lock` | `uv sync --locked` |
|
|
470
472
|
| `poetry.lock` | `poetry install` |
|
|
471
|
-
| `Gemfile.lock` | `bundle install`
|
|
473
|
+
| `Gemfile.lock` | `BUNDLE_FROZEN=true bundle install` |
|
|
472
474
|
|
|
473
475
|
The first match in that order wins. A project with no lock file in the list
|
|
474
476
|
runs no setup, and a `setupCommand` in the config file always wins. Thus the
|
|
475
477
|
agents find a worktree with its dependencies in place, and the reviewer can run
|
|
476
478
|
the tests. Each command holds to the lock file, so a lock file that does not
|
|
477
|
-
match the manifest stops the issue rather than changing the lock file.
|
|
479
|
+
match the manifest stops the issue rather than changing the lock file. The
|
|
480
|
+
exception is `go mod download`, which can add missing sums to `go.sum`.
|
|
478
481
|
|
|
479
482
|
A `setupCommand` that fails, or that does not finish in `setupTimeoutMinutes`,
|
|
480
483
|
hands the issue to a person. The wait for the checks has its own limit, so
|
package/dist/git.mjs
CHANGED
|
@@ -16,7 +16,10 @@ export function parseRemote(url) {
|
|
|
16
16
|
throw new Error(`Cannot parse the git remote URL: ${url}`);
|
|
17
17
|
}
|
|
18
18
|
export async function repoRoot(cwd) {
|
|
19
|
-
|
|
19
|
+
const top = await git(cwd, ['rev-parse', '--show-toplevel']);
|
|
20
|
+
const list = await git(cwd, ['worktree', 'list', '--porcelain']);
|
|
21
|
+
const [first = '', second = ''] = list.split('\n');
|
|
22
|
+
return first.startsWith('worktree ') && second !== 'bare' ? first.slice('worktree '.length) : top;
|
|
20
23
|
}
|
|
21
24
|
export async function detectRepo(cwd, remote) {
|
|
22
25
|
const root = await repoRoot(cwd);
|
package/dist/setup.mjs
CHANGED
|
@@ -6,11 +6,11 @@ const MARKERS = [
|
|
|
6
6
|
['yarn.lock', 'yarn install --frozen-lockfile'],
|
|
7
7
|
['bun.lock', 'bun install --frozen-lockfile'],
|
|
8
8
|
['bun.lockb', 'bun install --frozen-lockfile'],
|
|
9
|
-
['Cargo.lock', 'cargo fetch'],
|
|
9
|
+
['Cargo.lock', 'cargo fetch --locked'],
|
|
10
10
|
['go.sum', 'go mod download'],
|
|
11
|
-
['uv.lock', 'uv sync'],
|
|
11
|
+
['uv.lock', 'uv sync --locked'],
|
|
12
12
|
['poetry.lock', 'poetry install'],
|
|
13
|
-
['Gemfile.lock', 'bundle install'],
|
|
13
|
+
['Gemfile.lock', 'BUNDLE_FROZEN=true bundle install'],
|
|
14
14
|
];
|
|
15
15
|
function exists(path) {
|
|
16
16
|
return access(path).then(() => true, () => false);
|