next-issue 6.6.123 → 6.6.124

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 CHANGED
@@ -499,6 +499,9 @@ Three levels of console output:
499
499
  ## Requirements
500
500
 
501
501
  - Node 24 or later
502
+ - git 2.40 or later (every commit runs `git hook run`, every conflict with the
503
+ base runs `git check-attr --source`). A run or `serve` run on an older git
504
+ stops before it claims an issue, with an error that names both versions.
502
505
  - `gh`, authenticated with write access to the repository
503
506
  - a `remote` on GitHub: `github.com`, or a GitHub Enterprise host. Every `gh`
504
507
  call names the host of the remote url (`--repo <host>/<owner>/<name>`,
@@ -0,0 +1,22 @@
1
+ import { must } from './exec.mjs';
2
+ // `git hook run` (every commit) needs 2.36, `git check-attr --source` (every conflict) needs 2.40.
3
+ export const MIN_GIT = [2, 40];
4
+ export function gitVersionError(output) {
5
+ const match = /^git version (\d+)\.(\d+)(?:\.(\d+))?/.exec(output.trim());
6
+ if (match === null) {
7
+ return `cannot read the git version from "${output.trim()}"`;
8
+ }
9
+ const [major, minor] = [Number(match[1]), Number(match[2])];
10
+ const [needMajor, needMinor] = MIN_GIT;
11
+ if (major > needMajor || (major === needMajor && minor >= needMinor)) {
12
+ return undefined;
13
+ }
14
+ const found = match[3] === undefined ? `${major}.${minor}` : `${major}.${minor}.${match[3]}`;
15
+ return `git ${found} is too old: next-issue needs git ${needMajor}.${needMinor} or later`;
16
+ }
17
+ export async function checkGitVersion() {
18
+ const error = gitVersionError(await must('git', ['--version']));
19
+ if (error !== undefined) {
20
+ throw new Error(error);
21
+ }
22
+ }
package/dist/run.mjs CHANGED
@@ -8,6 +8,7 @@ import { withDefaultTimeout } from './exec.mjs';
8
8
  import { writeJson } from './files.mjs';
9
9
  import { slug } from './gh.mjs';
10
10
  import { detectRepo } from './git.mjs';
11
+ import { checkGitVersion } from './git-version.mjs';
11
12
  import { defaultBranch } from './github.mjs';
12
13
  import { hunter } from './hunt.mjs';
13
14
  import { lock, lockHolder } from './lock.mjs';
@@ -43,6 +44,7 @@ export async function runRepo(root, args, controls) {
43
44
  return withDefaultTimeout(minutesToMs(config.commandTimeoutMinutes), () => runWithConfig(root, args, controls, config));
44
45
  }
45
46
  async function runWithConfig(root, args, controls, config) {
47
+ await checkGitVersion();
46
48
  const repo = await detectRepo(root, config.remote);
47
49
  const recorder = await Recorder.create(repo.root, args.level, controls.onEvent);
48
50
  const pruned = await pruneRuns(repo.root, config.keepRunDays);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-issue",
3
- "version": "6.6.123",
3
+ "version": "6.6.124",
4
4
  "description": "Autonomous issue harness driven by the pi SDK",
5
5
  "keywords": [
6
6
  "github",