next-issue 14.4.2 → 14.4.4

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.
@@ -23,14 +23,20 @@ function labelFilter(labels, without, every) {
23
23
  const all = every.map((label) => ` label:${quoted(label)}`).join('');
24
24
  return any + all + without.map((label) => ` -label:${quoted(label)}`).join('');
25
25
  }
26
- export async function openIssues(repo, limit, labels, without = [], every = []) {
26
+ function blockedFilter(blocked) {
27
+ if (blocked === undefined) {
28
+ return '';
29
+ }
30
+ return blocked ? ' is:blocked' : ' -is:blocked';
31
+ }
32
+ export async function openIssues(repo, limit, labels, without = [], every = [], blocked) {
27
33
  const parsed = await ghJson(repo, [
28
34
  'issue',
29
35
  'list',
30
36
  '--state',
31
37
  'open',
32
38
  '--search',
33
- `sort:created-asc${labelFilter(labels, without, every)}`,
39
+ `sort:created-asc${labelFilter(labels, without, every)}${blockedFilter(blocked)}`,
34
40
  '--limit',
35
41
  String(limit),
36
42
  '--json',
@@ -7,11 +7,16 @@ import { dropClosed, stopNow } from './handover.mjs';
7
7
  import { hasLabel } from './labels.mjs';
8
8
  import { heldByPerson, writeState } from './state.mjs';
9
9
  import { heldOnBase } from './unsettled.mjs';
10
- export function listedIssues(ports, repo, config, labels) {
10
+ export async function listedIssues(ports, repo, config, labels) {
11
11
  const { ready, needsHuman, skip } = config.labels;
12
- return ready.length === 0
13
- ? ports.openIssues(repo, config.issueLimit, [])
14
- : ports.openIssues(repo, config.issueLimit, [ready, ...labels], [needsHuman, skip]);
12
+ const search = (blocked) => ready.length === 0
13
+ ? ports.openIssues(repo, config.issueLimit, [], [], [], blocked)
14
+ : ports.openIssues(repo, config.issueLimit, [ready, ...labels], [needsHuman, skip], [], blocked);
15
+ const issues = new Map();
16
+ for (const issue of [...(await search(false)), ...(await search(true))]) {
17
+ issues.set(issue.number, issue);
18
+ }
19
+ return [...issues.values()].sort((a, b) => a.createdAt.localeCompare(b.createdAt));
15
20
  }
16
21
  export function waitingIssues(ports, repo, config) {
17
22
  const { ready, needsHuman, skip } = config.labels;
@@ -110,7 +110,10 @@ export function setHunting(run, on) {
110
110
  export function setWatching(run, on) {
111
111
  if (!on) {
112
112
  run.hunting.set(false);
113
- dropUpgrade(run);
113
+ if (dropUpgrade(run)) {
114
+ run.stop = undefined;
115
+ run.progress = { ...run.progress, status: 'running' };
116
+ }
114
117
  }
115
118
  run.watching.set(on);
116
119
  run.progress = { ...run.progress, watching: on, hunting: run.hunting.on() };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-issue",
3
- "version": "14.4.2",
3
+ "version": "14.4.4",
4
4
  "description": "Autonomous issue harness driven by the Claude Agent SDK",
5
5
  "keywords": [
6
6
  "github",