next-issue 16.0.0 → 16.1.0
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 +0 -1
- package/dist/shared/args.mjs +0 -1
- package/dist/worker/progress.mjs +34 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -91,7 +91,6 @@ A field that is not in the file keeps its default. See [Configuration](https://g
|
|
|
91
91
|
| `watch on\|off` | Switch watching of the going run |
|
|
92
92
|
| `hunt on\|off` | Switch hunting of the going run |
|
|
93
93
|
| `init` | Write the config file with the defaults |
|
|
94
|
-
| `serve` | Run the worker of this repository that the clients talk to |
|
|
95
94
|
| `stop` | Stop the going run after its current issues |
|
|
96
95
|
| `logs` | Show the latest run log and follow it |
|
|
97
96
|
| `update` | Install the `create-issue` and `answer-hand-over` skills for Claude Code |
|
package/dist/shared/args.mjs
CHANGED
|
@@ -16,7 +16,6 @@ export const USAGE = `next-issue <command> [options]
|
|
|
16
16
|
watch on|off switch watching of the going run; off also turns hunting off
|
|
17
17
|
hunt on|off switch hunting of the going run; on also turns watching on
|
|
18
18
|
init write ${CONFIG_FILE} with the defaults and add .next-issue/ and .worktrees/ to info/exclude
|
|
19
|
-
serve run the worker of this repository that the clients talk to
|
|
20
19
|
stop stop the going run after its current issues
|
|
21
20
|
logs show the latest run log and follow it
|
|
22
21
|
update install the create-issue and answer-hand-over skills for Claude Code
|
package/dist/worker/progress.mjs
CHANGED
|
@@ -1,9 +1,40 @@
|
|
|
1
|
+
const STEPS = {
|
|
2
|
+
'implement.start': 'implementing',
|
|
3
|
+
'review.start': 'reviewing',
|
|
4
|
+
'fix.start': 'fixing',
|
|
5
|
+
'commit-fix.start': 'fixing',
|
|
6
|
+
'land.start': 'landing',
|
|
7
|
+
'ci-checks.start': 'waiting-for-checks',
|
|
8
|
+
};
|
|
1
9
|
export function startProgress(hunting = false) {
|
|
2
|
-
return { status: 'running', hunting };
|
|
10
|
+
return { status: 'running', hunting, issues: [] };
|
|
3
11
|
}
|
|
4
12
|
export function applyEvent(progress, record) {
|
|
5
|
-
|
|
13
|
+
const kind = record['kind'];
|
|
14
|
+
if (kind === 'issues.fail') {
|
|
6
15
|
return { ...progress, error: String(record['error']) };
|
|
7
16
|
}
|
|
8
|
-
|
|
17
|
+
const issue = record['issue'];
|
|
18
|
+
if (typeof kind !== 'string' || typeof issue !== 'number') {
|
|
19
|
+
return progress;
|
|
20
|
+
}
|
|
21
|
+
if (kind === 'issue.start') {
|
|
22
|
+
return { ...progress, issues: [...withoutIssue(progress, issue), { issue }] };
|
|
23
|
+
}
|
|
24
|
+
if (kind === 'issue.end' || kind === 'issue.error') {
|
|
25
|
+
return { ...progress, issues: withoutIssue(progress, issue) };
|
|
26
|
+
}
|
|
27
|
+
const step = STEPS[kind];
|
|
28
|
+
if (step === undefined || !progress.issues.some((running) => running.issue === issue)) {
|
|
29
|
+
return progress;
|
|
30
|
+
}
|
|
31
|
+
const round = step === 'reviewing' && typeof record['round'] === 'number' ? record['round'] : undefined;
|
|
32
|
+
const entry = { issue, step, ...(round === undefined ? {} : { round }) };
|
|
33
|
+
return {
|
|
34
|
+
...progress,
|
|
35
|
+
issues: progress.issues.map((running) => (running.issue === issue ? entry : running)),
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
function withoutIssue(progress, issue) {
|
|
39
|
+
return progress.issues.filter((running) => running.issue !== issue);
|
|
9
40
|
}
|