@kud/gh 0.19.0 → 0.21.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/dist/inbox.d.ts +88 -5
- package/dist/inbox.d.ts.map +1 -1
- package/dist/inbox.js +197 -6
- package/dist/inbox.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/ref.d.ts +29 -0
- package/dist/ref.d.ts.map +1 -0
- package/dist/ref.js +36 -0
- package/dist/ref.js.map +1 -0
- package/package.json +5 -1
package/dist/inbox.d.ts
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* axis is unchanged: the multiplication is what `minimal` exists to drop.
|
|
16
16
|
*/
|
|
17
17
|
/**
|
|
18
|
-
* How many of your own open PRs to ask for.
|
|
18
|
+
* How many of your own open PRs to ask for on the first page.
|
|
19
19
|
*
|
|
20
20
|
* This is the single biggest lever on the query's cost, because connections
|
|
21
21
|
* MULTIPLY: the health and conversation fragments hang ~60 nodes off each PR
|
|
@@ -32,11 +32,36 @@
|
|
|
32
32
|
* At 30 this search costs 2,400 nodes instead of 8,000, roughly halving the whole
|
|
33
33
|
* query.
|
|
34
34
|
*
|
|
35
|
+
* It is 100 again since 2026-10-05, and the history above is why that needs a
|
|
36
|
+
* reason rather than being a revert. The 30-row window dropped real PRs in
|
|
37
|
+
* silence for one host shape: a host hiding one org's repos client-side lost
|
|
38
|
+
* visible rows whenever the hidden org filled the window (39 open PRs, 21 in the
|
|
39
|
+
* hidden org, 30 fetched — the personal view showed 9 of 18). A server-side
|
|
40
|
+
* `-user:` exclusion was measured and rejected: GitHub search then drops the
|
|
41
|
+
* viewer's own private-repo PRs. So the window has to hold the whole set, and
|
|
42
|
+
* `fetchInbox` pages past it when it does not — see `MY_PRS_MAX_PAGES`.
|
|
43
|
+
*
|
|
44
|
+
* The cost per page rises with this, roughly back toward the 111 points the old
|
|
45
|
+
* note measured. That is visible rather than hidden: `rateLimit { cost }` rides
|
|
46
|
+
* on every document this file builds, including the follow-up pages, so a host
|
|
47
|
+
* watching the budget sees what the wider window spends.
|
|
48
|
+
*
|
|
35
49
|
* `issueCount` is fetched alongside so the cap can never drop rows in silence: a
|
|
36
50
|
* scalar costs nothing, and a host that knows the true total can say what it is
|
|
37
51
|
* not showing.
|
|
38
52
|
*/
|
|
39
|
-
export declare const MY_PRS_LIMIT =
|
|
53
|
+
export declare const MY_PRS_LIMIT = 100;
|
|
54
|
+
/**
|
|
55
|
+
* How many pages of `myPRs` one `fetchInbox` may hold, first page included.
|
|
56
|
+
*
|
|
57
|
+
* The first page covers almost every account on its own — `MY_PRS_LIMIT` is the
|
|
58
|
+
* search API's maximum — and each further page is one more full-cost request, so
|
|
59
|
+
* the loop stops at five (500 rows) with more still available rather than
|
|
60
|
+
* chasing an unbounded set. Past the ceiling the tab is still marked sampled —
|
|
61
|
+
* `sourceCoverage` reads `pageInfo.hasNextPage`, not the row count — so the
|
|
62
|
+
* dim "shown/total" note keeps describing the same situation it always did.
|
|
63
|
+
*/
|
|
64
|
+
export declare const MY_PRS_MAX_PAGES = 5;
|
|
40
65
|
/**
|
|
41
66
|
* How many rows each source asks for — the cap, as DATA rather than a literal
|
|
42
67
|
* buried in eight query strings.
|
|
@@ -81,8 +106,10 @@ export declare const MY_PRS_LIMIT = 30;
|
|
|
81
106
|
* hence 6,100 for 38 rows. A day spent with fifty PRs assigned would make this
|
|
82
107
|
* the heaviest search in the query.
|
|
83
108
|
*
|
|
84
|
-
* The PR sources keep their caps. There the outer number really does
|
|
85
|
-
* ~80 nested nodes
|
|
109
|
+
* The other PR sources keep their caps. There the outer number really does
|
|
110
|
+
* multiply ~80 nested nodes. `myPRs` is the exception since 2026-10-05: its
|
|
111
|
+
* window has to hold its whole set (see `MY_PRS_LIMIT`), and `fetchInbox`
|
|
112
|
+
* pages past the first window when it does not.
|
|
86
113
|
*/
|
|
87
114
|
export declare const SOURCE_LIMITS: Record<InboxSource, number>;
|
|
88
115
|
export type InboxShape = "full" | "minimal";
|
|
@@ -243,6 +270,30 @@ export declare const buildInboxQueries: (options?: InboxQueryOptions & {
|
|
|
243
270
|
* moment.
|
|
244
271
|
*/
|
|
245
272
|
export declare const mergeInboxData: (parts: any[]) => any;
|
|
273
|
+
/** What runs one inbox document against GitHub. Defaults to the live CLI. */
|
|
274
|
+
export type InboxRunner = (query: string) => Promise<any>;
|
|
275
|
+
/**
|
|
276
|
+
* Fetch the whole inbox: every source in parallel, merged, with `myPRs`
|
|
277
|
+
* paged to its `issueCount`.
|
|
278
|
+
*
|
|
279
|
+
* This is the function a host should call to get the paginated inbox. Building
|
|
280
|
+
* documents with `buildInboxQueries` and merging them with `mergeInboxData`
|
|
281
|
+
* still works, but it leaves `myPRs` at its first window — this is the only
|
|
282
|
+
* entry point that follows `pageInfo` past it, so every host fetching through
|
|
283
|
+
* here gets the fix with no change at its own layer.
|
|
284
|
+
*
|
|
285
|
+
* Only `myPRs` pages. The other sources keep their caps as cost decisions (see
|
|
286
|
+
* `SOURCE_LIMITS`): their windows are priced, and `sourceCoverage` already tells
|
|
287
|
+
* a host what they are not showing. `myPRs` is different — its window has to
|
|
288
|
+
* hold its whole set, because a host filtering repos client-side cannot tell a
|
|
289
|
+
* row outside the window from a row that does not exist.
|
|
290
|
+
*
|
|
291
|
+
* `run` is the seam tests hold: pass a fake returning canned pages, read the
|
|
292
|
+
* real `gh api graphql` by passing nothing.
|
|
293
|
+
*/
|
|
294
|
+
export declare const fetchInbox: (options?: InboxQueryOptions & {
|
|
295
|
+
sourcesPerQuery?: number;
|
|
296
|
+
}, run?: InboxRunner) => Promise<any>;
|
|
246
297
|
/**
|
|
247
298
|
* What a source matched, against what it was allowed to return.
|
|
248
299
|
*
|
|
@@ -266,7 +317,10 @@ export type SourceCoverage = {
|
|
|
266
317
|
* We asked for N and got N, so the rows are a sample of the set.
|
|
267
318
|
*
|
|
268
319
|
* Derived from our own request rather than from `total`, which is the entire
|
|
269
|
-
* point: a cap is a fact we hold, and it cannot be wrong about itself.
|
|
320
|
+
* point: a cap is a fact we hold, and it cannot be wrong about itself. Where
|
|
321
|
+
* the source selected `pageInfo`, `hasNextPage` answers instead — a paged
|
|
322
|
+
* fetch holds more than any one window asked for, so the window is the wrong
|
|
323
|
+
* thing to measure against.
|
|
270
324
|
*/
|
|
271
325
|
capped: boolean;
|
|
272
326
|
/**
|
|
@@ -425,4 +479,33 @@ export declare const buildHealthQueries: (ids: readonly string[], batchSize?: nu
|
|
|
425
479
|
* it was.
|
|
426
480
|
*/
|
|
427
481
|
export declare const mergeHealth: (data: any, parts: readonly any[]) => any;
|
|
482
|
+
/**
|
|
483
|
+
* One PR or issue by repo and number, as a node `toGHItem` can map — for an
|
|
484
|
+
* item the viewer named rather than one a search found (the cockpit launcher's
|
|
485
|
+
* `acme/api-gateway#2926`).
|
|
486
|
+
*
|
|
487
|
+
* THE SAME SELECTIONS AS THE INBOX, interpolated from the constants above rather
|
|
488
|
+
* than written out again, and that is the whole point of it living in this
|
|
489
|
+
* file. A node fetched without `PR_HEALTH` maps to `health: undefined`, which
|
|
490
|
+
* `whoseMove` reads as `unknown`, and a drill opened on it loses every action
|
|
491
|
+
* keyed off health; without `PR_CONVERSATION` the turn and the thread count go
|
|
492
|
+
* with it. A hand-written copy of the selection would be correct on the day it
|
|
493
|
+
* was written and drift from then on.
|
|
494
|
+
*
|
|
495
|
+
* `state` is the one field the inbox's sources do not carry, because they only
|
|
496
|
+
* ever search `is:open`. A named item can be merged or closed, and
|
|
497
|
+
* `computeHealth` reads `state` before anything else — without it a merged PR
|
|
498
|
+
* would be priced on its last checks and read as live.
|
|
499
|
+
*
|
|
500
|
+
* `issueOrPullRequest` because the shorthand does not say which, and GitHub
|
|
501
|
+
* numbers both from one sequence: the node's `__typename` answers it.
|
|
502
|
+
*
|
|
503
|
+
* Returns `null` for NOT_FOUND, which is how GitHub answers both "no such item"
|
|
504
|
+
* and "no access" — a private repo is indistinguishable from an absent one, by
|
|
505
|
+
* design. `gh` exits non-zero on it but still prints the body, so the error is
|
|
506
|
+
* read for its `errors[].type` rather than treated as a failure. Anything else
|
|
507
|
+
* (no network, an expired token) throws, so a caller can tell "nothing there"
|
|
508
|
+
* from "could not ask".
|
|
509
|
+
*/
|
|
510
|
+
export declare const fetchItemNode: (repo: string, number: number, run?: (query: string, vars: Record<string, string | number>) => Promise<any>) => Promise<any | null>;
|
|
428
511
|
//# sourceMappingURL=inbox.d.ts.map
|
package/dist/inbox.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inbox.d.ts","sourceRoot":"","sources":["../src/inbox.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"inbox.d.ts","sourceRoot":"","sources":["../src/inbox.ts"],"names":[],"mappings":"AAUA;;;;;;;;;;;;;;;GAeG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,eAAO,MAAM,YAAY,MAAM,CAAA;AAE/B;;;;;;;;;GASG;AACH,eAAO,MAAM,gBAAgB,IAAI,CAAA;AAEjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,WAAW,EAAE,MAAM,CASrD,CAAA;AAED,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,SAAS,CAAA;AAE3C,0EAA0E;AAC1E,MAAM,MAAM,WAAW,GACnB,OAAO,GACP,gBAAgB,GAChB,UAAU,GACV,UAAU,GACV,YAAY,GACZ,gBAAgB,GAChB,SAAS,GACT,cAAc,CAAA;AAElB,oEAAoE;AACpE,eAAO,MAAM,aAAa,EAAE,SAAS,WAAW,EAS/C,CAAA;AAED,2CAA2C;AAC3C,MAAM,MAAM,iBAAiB,GAAG;IAC9B,2DAA2D;IAC3D,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;;;OAIG;IACH,YAAY,CAAC,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;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,eAAO,MAAM,aAAa,GACxB,MAAM,MAAM,EACZ,QAAQ,MAAM,EACd,MAAK,CACH,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,KAClC,OAAO,CAAC,GAAG,CAAa,KAC5B,OAAO,CAAC,GAAG,GAAG,IAAI,CA+BpB,CAAA"}
|
package/dist/inbox.js
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
// Query-only by design. Assembling the result into sections is the surface's
|
|
6
6
|
// own vocabulary — cockpit splits home from work, a web dashboard may group by
|
|
7
7
|
// project — so nothing here decides what a section is.
|
|
8
|
+
import { ghGraphql } from "./gh.js";
|
|
8
9
|
/**
|
|
9
10
|
* How much of each row to ask for.
|
|
10
11
|
*
|
|
@@ -22,7 +23,7 @@
|
|
|
22
23
|
* axis is unchanged: the multiplication is what `minimal` exists to drop.
|
|
23
24
|
*/
|
|
24
25
|
/**
|
|
25
|
-
* How many of your own open PRs to ask for.
|
|
26
|
+
* How many of your own open PRs to ask for on the first page.
|
|
26
27
|
*
|
|
27
28
|
* This is the single biggest lever on the query's cost, because connections
|
|
28
29
|
* MULTIPLY: the health and conversation fragments hang ~60 nodes off each PR
|
|
@@ -39,11 +40,36 @@
|
|
|
39
40
|
* At 30 this search costs 2,400 nodes instead of 8,000, roughly halving the whole
|
|
40
41
|
* query.
|
|
41
42
|
*
|
|
43
|
+
* It is 100 again since 2026-10-05, and the history above is why that needs a
|
|
44
|
+
* reason rather than being a revert. The 30-row window dropped real PRs in
|
|
45
|
+
* silence for one host shape: a host hiding one org's repos client-side lost
|
|
46
|
+
* visible rows whenever the hidden org filled the window (39 open PRs, 21 in the
|
|
47
|
+
* hidden org, 30 fetched — the personal view showed 9 of 18). A server-side
|
|
48
|
+
* `-user:` exclusion was measured and rejected: GitHub search then drops the
|
|
49
|
+
* viewer's own private-repo PRs. So the window has to hold the whole set, and
|
|
50
|
+
* `fetchInbox` pages past it when it does not — see `MY_PRS_MAX_PAGES`.
|
|
51
|
+
*
|
|
52
|
+
* The cost per page rises with this, roughly back toward the 111 points the old
|
|
53
|
+
* note measured. That is visible rather than hidden: `rateLimit { cost }` rides
|
|
54
|
+
* on every document this file builds, including the follow-up pages, so a host
|
|
55
|
+
* watching the budget sees what the wider window spends.
|
|
56
|
+
*
|
|
42
57
|
* `issueCount` is fetched alongside so the cap can never drop rows in silence: a
|
|
43
58
|
* scalar costs nothing, and a host that knows the true total can say what it is
|
|
44
59
|
* not showing.
|
|
45
60
|
*/
|
|
46
|
-
export const MY_PRS_LIMIT =
|
|
61
|
+
export const MY_PRS_LIMIT = 100;
|
|
62
|
+
/**
|
|
63
|
+
* How many pages of `myPRs` one `fetchInbox` may hold, first page included.
|
|
64
|
+
*
|
|
65
|
+
* The first page covers almost every account on its own — `MY_PRS_LIMIT` is the
|
|
66
|
+
* search API's maximum — and each further page is one more full-cost request, so
|
|
67
|
+
* the loop stops at five (500 rows) with more still available rather than
|
|
68
|
+
* chasing an unbounded set. Past the ceiling the tab is still marked sampled —
|
|
69
|
+
* `sourceCoverage` reads `pageInfo.hasNextPage`, not the row count — so the
|
|
70
|
+
* dim "shown/total" note keeps describing the same situation it always did.
|
|
71
|
+
*/
|
|
72
|
+
export const MY_PRS_MAX_PAGES = 5;
|
|
47
73
|
/**
|
|
48
74
|
* How many rows each source asks for — the cap, as DATA rather than a literal
|
|
49
75
|
* buried in eight query strings.
|
|
@@ -88,8 +114,10 @@ export const MY_PRS_LIMIT = 30;
|
|
|
88
114
|
* hence 6,100 for 38 rows. A day spent with fifty PRs assigned would make this
|
|
89
115
|
* the heaviest search in the query.
|
|
90
116
|
*
|
|
91
|
-
* The PR sources keep their caps. There the outer number really does
|
|
92
|
-
* ~80 nested nodes
|
|
117
|
+
* The other PR sources keep their caps. There the outer number really does
|
|
118
|
+
* multiply ~80 nested nodes. `myPRs` is the exception since 2026-10-05: its
|
|
119
|
+
* window has to hold its whole set (see `MY_PRS_LIMIT`), and `fetchInbox`
|
|
120
|
+
* pages past the first window when it does not.
|
|
93
121
|
*/
|
|
94
122
|
export const SOURCE_LIMITS = {
|
|
95
123
|
myPRs: MY_PRS_LIMIT,
|
|
@@ -308,10 +336,18 @@ const sinceDay = (days) => new Date(Date.now() - days * 86400 * 1000).toISOStrin
|
|
|
308
336
|
* ask for any subset without this file growing a second copy of the query text.
|
|
309
337
|
* Each value is the whole `alias: search(…) { … }` selection, indented as it
|
|
310
338
|
* appears in the document.
|
|
339
|
+
*
|
|
340
|
+
* `after` is how `fetchInbox` pages `myPRs` past its first window, and only
|
|
341
|
+
* `myPRs` takes it — it is the one source whose window has to hold its whole
|
|
342
|
+
* set (see `MY_PRS_LIMIT`), so it is the one source that selects `pageInfo`.
|
|
343
|
+
* The other entries ignore the parameter; giving every entry its own cursor
|
|
344
|
+
* would invite paging a source whose cap is a cost decision rather than a
|
|
345
|
+
* completeness one.
|
|
311
346
|
*/
|
|
312
347
|
const SOURCES = {
|
|
313
|
-
myPRs: ({ scope, health, size, conversation, prLabels }, first) => ` myPRs: search(query: "${scope}is:pr is:open author:@me", type: ISSUE, first: ${first}) {
|
|
348
|
+
myPRs: ({ scope, health, size, conversation, prLabels }, first, after) => ` myPRs: search(query: "${scope}is:pr is:open author:@me", type: ISSUE, first: ${first}${after ? `, after: ${JSON.stringify(after)}` : ""}) {
|
|
314
349
|
issueCount
|
|
350
|
+
pageInfo { hasNextPage endCursor }
|
|
315
351
|
nodes { __typename ... on PullRequest {
|
|
316
352
|
id number title createdAt url headRefName isDraft
|
|
317
353
|
repository { nameWithOwner }
|
|
@@ -605,6 +641,71 @@ export const mergeInboxData = (parts) => {
|
|
|
605
641
|
: {}),
|
|
606
642
|
};
|
|
607
643
|
};
|
|
644
|
+
/*
|
|
645
|
+
* One further page of `myPRs` alone, past the cursor the last page ended on.
|
|
646
|
+
*
|
|
647
|
+
* Built from the same `SOURCES.myPRs` entry as the first page rather than a
|
|
648
|
+
* second copy of its text, so the two cannot drift — a field added to one is on
|
|
649
|
+
* both. `rateLimit` and `viewer` ride along for the same reason they do on every
|
|
650
|
+
* subset `buildInboxQuery` emits: the parts are merged with `mergeInboxData`,
|
|
651
|
+
* which needs the envelope on each one to keep the cost honest.
|
|
652
|
+
*/
|
|
653
|
+
const buildMyPRsPageQuery = (options, first, after) => `{
|
|
654
|
+
rateLimit { cost nodeCount remaining resetAt }
|
|
655
|
+
viewer { login }
|
|
656
|
+
${SOURCES.myPRs(selectionsFor(options), first, after)}
|
|
657
|
+
}
|
|
658
|
+
`;
|
|
659
|
+
/**
|
|
660
|
+
* Fetch the whole inbox: every source in parallel, merged, with `myPRs`
|
|
661
|
+
* paged to its `issueCount`.
|
|
662
|
+
*
|
|
663
|
+
* This is the function a host should call to get the paginated inbox. Building
|
|
664
|
+
* documents with `buildInboxQueries` and merging them with `mergeInboxData`
|
|
665
|
+
* still works, but it leaves `myPRs` at its first window — this is the only
|
|
666
|
+
* entry point that follows `pageInfo` past it, so every host fetching through
|
|
667
|
+
* here gets the fix with no change at its own layer.
|
|
668
|
+
*
|
|
669
|
+
* Only `myPRs` pages. The other sources keep their caps as cost decisions (see
|
|
670
|
+
* `SOURCE_LIMITS`): their windows are priced, and `sourceCoverage` already tells
|
|
671
|
+
* a host what they are not showing. `myPRs` is different — its window has to
|
|
672
|
+
* hold its whole set, because a host filtering repos client-side cannot tell a
|
|
673
|
+
* row outside the window from a row that does not exist.
|
|
674
|
+
*
|
|
675
|
+
* `run` is the seam tests hold: pass a fake returning canned pages, read the
|
|
676
|
+
* real `gh api graphql` by passing nothing.
|
|
677
|
+
*/
|
|
678
|
+
export const fetchInbox = async (options = {}, run = ghGraphql) => {
|
|
679
|
+
const parts = await Promise.all(buildInboxQueries(options).map(run));
|
|
680
|
+
let data = mergeInboxData(parts);
|
|
681
|
+
if (!data || !sourcesFor(options).includes("myPRs"))
|
|
682
|
+
return data;
|
|
683
|
+
const pageSize = limitsFor(options).myPRs;
|
|
684
|
+
let pages = 1;
|
|
685
|
+
let cursor = data.myPRs?.pageInfo;
|
|
686
|
+
while (pages < MY_PRS_MAX_PAGES &&
|
|
687
|
+
cursor?.hasNextPage === true &&
|
|
688
|
+
typeof cursor?.endCursor === "string") {
|
|
689
|
+
const page = await run(buildMyPRsPageQuery(options, pageSize, cursor.endCursor));
|
|
690
|
+
if (!page?.myPRs)
|
|
691
|
+
break;
|
|
692
|
+
const envelope = mergeInboxData([data, page]);
|
|
693
|
+
data = {
|
|
694
|
+
...envelope,
|
|
695
|
+
myPRs: {
|
|
696
|
+
...page.myPRs,
|
|
697
|
+
issueCount: typeof page.myPRs.issueCount === "number"
|
|
698
|
+
? page.myPRs.issueCount
|
|
699
|
+
: data.myPRs?.issueCount,
|
|
700
|
+
pageInfo: page.myPRs.pageInfo,
|
|
701
|
+
nodes: [...(data.myPRs?.nodes ?? []), ...(page.myPRs.nodes ?? [])],
|
|
702
|
+
},
|
|
703
|
+
};
|
|
704
|
+
pages += 1;
|
|
705
|
+
cursor = data.myPRs?.pageInfo;
|
|
706
|
+
}
|
|
707
|
+
return data;
|
|
708
|
+
};
|
|
608
709
|
/**
|
|
609
710
|
* What each source could see, against what it was allowed to show.
|
|
610
711
|
*
|
|
@@ -667,11 +768,24 @@ export const sourceCoverage = (data, limits = {}) => {
|
|
|
667
768
|
const shown = answered.nodes?.length ?? 0;
|
|
668
769
|
const total = typeof answered.issueCount === "number" ? answered.issueCount : shown;
|
|
669
770
|
const cap = caps[source];
|
|
771
|
+
/*
|
|
772
|
+
* A source carrying `pageInfo` answers the cap question itself, and its
|
|
773
|
+
* answer wins over the row count. `fetchInbox` pages `myPRs` to its whole
|
|
774
|
+
* set, so a complete fetch holds MORE rows than the first page asked for —
|
|
775
|
+
* and measuring those against the first page's cap would call every large
|
|
776
|
+
* account sampled forever. `hasNextPage: false` means the set is whole
|
|
777
|
+
* whatever the count says; `true` means rows exist past what is held, which
|
|
778
|
+
* is exactly what `capped` claims. Sources without it keep the old rule.
|
|
779
|
+
*/
|
|
780
|
+
const paging = answered.pageInfo;
|
|
781
|
+
const capped = typeof paging?.hasNextPage === "boolean"
|
|
782
|
+
? paging.hasNextPage
|
|
783
|
+
: shown >= cap;
|
|
670
784
|
out[source] = {
|
|
671
785
|
total,
|
|
672
786
|
shown,
|
|
673
787
|
cap,
|
|
674
|
-
capped
|
|
788
|
+
capped,
|
|
675
789
|
partial: shown < cap && total > shown,
|
|
676
790
|
};
|
|
677
791
|
}
|
|
@@ -865,4 +979,81 @@ export const mergeHealth = (data, parts) => {
|
|
|
865
979
|
}
|
|
866
980
|
return out;
|
|
867
981
|
};
|
|
982
|
+
/**
|
|
983
|
+
* One PR or issue by repo and number, as a node `toGHItem` can map — for an
|
|
984
|
+
* item the viewer named rather than one a search found (the cockpit launcher's
|
|
985
|
+
* `acme/api-gateway#2926`).
|
|
986
|
+
*
|
|
987
|
+
* THE SAME SELECTIONS AS THE INBOX, interpolated from the constants above rather
|
|
988
|
+
* than written out again, and that is the whole point of it living in this
|
|
989
|
+
* file. A node fetched without `PR_HEALTH` maps to `health: undefined`, which
|
|
990
|
+
* `whoseMove` reads as `unknown`, and a drill opened on it loses every action
|
|
991
|
+
* keyed off health; without `PR_CONVERSATION` the turn and the thread count go
|
|
992
|
+
* with it. A hand-written copy of the selection would be correct on the day it
|
|
993
|
+
* was written and drift from then on.
|
|
994
|
+
*
|
|
995
|
+
* `state` is the one field the inbox's sources do not carry, because they only
|
|
996
|
+
* ever search `is:open`. A named item can be merged or closed, and
|
|
997
|
+
* `computeHealth` reads `state` before anything else — without it a merged PR
|
|
998
|
+
* would be priced on its last checks and read as live.
|
|
999
|
+
*
|
|
1000
|
+
* `issueOrPullRequest` because the shorthand does not say which, and GitHub
|
|
1001
|
+
* numbers both from one sequence: the node's `__typename` answers it.
|
|
1002
|
+
*
|
|
1003
|
+
* Returns `null` for NOT_FOUND, which is how GitHub answers both "no such item"
|
|
1004
|
+
* and "no access" — a private repo is indistinguishable from an absent one, by
|
|
1005
|
+
* design. `gh` exits non-zero on it but still prints the body, so the error is
|
|
1006
|
+
* read for its `errors[].type` rather than treated as a failure. Anything else
|
|
1007
|
+
* (no network, an expired token) throws, so a caller can tell "nothing there"
|
|
1008
|
+
* from "could not ask".
|
|
1009
|
+
*/
|
|
1010
|
+
export const fetchItemNode = async (repo, number, run = ghGraphql) => {
|
|
1011
|
+
const [owner, name] = repo.split("/");
|
|
1012
|
+
if (!owner || !name)
|
|
1013
|
+
throw new Error(`"${repo}" is not an owner/name slug`);
|
|
1014
|
+
const query = `
|
|
1015
|
+
query($owner: String!, $name: String!, $number: Int!) {
|
|
1016
|
+
repository(owner: $owner, name: $name) {
|
|
1017
|
+
issueOrPullRequest(number: $number) {
|
|
1018
|
+
__typename
|
|
1019
|
+
... on Issue {
|
|
1020
|
+
number title state createdAt url repository { nameWithOwner } author { login }
|
|
1021
|
+
${ISSUE_CONVERSATION}
|
|
1022
|
+
${ISSUE_LABELS}
|
|
1023
|
+
}
|
|
1024
|
+
... on PullRequest {
|
|
1025
|
+
id number title state createdAt url headRefName isDraft repository { nameWithOwner } author { login }
|
|
1026
|
+
${PR_SIZE}
|
|
1027
|
+
${PR_HEALTH}
|
|
1028
|
+
${PR_CONVERSATION}
|
|
1029
|
+
${PR_LABELS}
|
|
1030
|
+
}
|
|
1031
|
+
}
|
|
1032
|
+
}
|
|
1033
|
+
}
|
|
1034
|
+
`;
|
|
1035
|
+
try {
|
|
1036
|
+
const data = await run(query, { owner, name, number });
|
|
1037
|
+
return data?.repository?.issueOrPullRequest ?? null;
|
|
1038
|
+
}
|
|
1039
|
+
catch (error) {
|
|
1040
|
+
if (isNotFound(error))
|
|
1041
|
+
return null;
|
|
1042
|
+
throw error;
|
|
1043
|
+
}
|
|
1044
|
+
};
|
|
1045
|
+
const isNotFound = (error) => {
|
|
1046
|
+
const stdout = error?.stdout;
|
|
1047
|
+
if (typeof stdout !== "string" || !stdout.trim())
|
|
1048
|
+
return false;
|
|
1049
|
+
try {
|
|
1050
|
+
const errors = JSON.parse(stdout)?.errors;
|
|
1051
|
+
return (Array.isArray(errors) &&
|
|
1052
|
+
errors.length > 0 &&
|
|
1053
|
+
errors.every((e) => e?.type === "NOT_FOUND"));
|
|
1054
|
+
}
|
|
1055
|
+
catch {
|
|
1056
|
+
return false;
|
|
1057
|
+
}
|
|
1058
|
+
};
|
|
868
1059
|
//# sourceMappingURL=inbox.js.map
|
package/dist/inbox.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inbox.js","sourceRoot":"","sources":["../src/inbox.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,2EAA2E;AAC3E,YAAY;AACZ,EAAE;AACF,6EAA6E;AAC7E,+EAA+E;AAC/E,uDAAuD;AAEvD;;;;;;;;;;;;;;;GAeG;AACH;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,EAAE,CAAA;AAE9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,MAAM,CAAC,MAAM,aAAa,GAAgC;IACxD,KAAK,EAAE,YAAY;IACnB,cAAc,EAAE,EAAE;IAClB,QAAQ,EAAE,EAAE;IACZ,QAAQ,EAAE,GAAG;IACb,UAAU,EAAE,GAAG;IACf,cAAc,EAAE,GAAG;IACnB,OAAO,EAAE,EAAE;IACX,YAAY,EAAE,EAAE;CACjB,CAAA;AAeD,oEAAoE;AACpE,MAAM,CAAC,MAAM,aAAa,GAA2B;IACnD,OAAO;IACP,gBAAgB;IAChB,UAAU;IACV,UAAU;IACV,YAAY;IACZ,gBAAgB;IAChB,SAAS;IACT,cAAc;CACf,CAAA;AAwED;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,CACvB,UAA6B,EAAE,EACF,EAAE;IAC/B,MAAM,MAAM,GAAG,EAAE,GAAG,aAAa,EAAE,CAAA;IACnC,KAAK,MAAM,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C,KAAK,CAAC;YAAE,OAAO,IAAI,CAAA;QAClC,MAAM,KAAK,CAAA;IACb,CAAC;AACH,CAAC,CAAA;AAED,MAAM,UAAU,GAAG,CAAC,KAAc,EAAW,EAAE;IAC7C,MAAM,MAAM,GAAI,KAA8B,EAAE,MAAM,CAAA;IACtD,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE;QAAE,OAAO,KAAK,CAAA;IAC9D,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;QACzC,OAAO,CACL,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;YACrB,MAAM,CAAC,MAAM,GAAG,CAAC;YACjB,MAAM,CAAC,KAAK,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,KAAK,WAAW,CAAC,CAClD,CAAA;IACH,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAA;IACd,CAAC;AACH,CAAC,CAAA"}
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,cAAc,SAAS,CAAA;AACvB,cAAc,YAAY,CAAA;AAC1B,cAAc,YAAY,CAAA;AAC1B,cAAc,SAAS,CAAA;AACvB,cAAc,kBAAkB,CAAA;AAChC,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA;AAC5B,cAAc,cAAc,CAAA;AAC5B,cAAc,mBAAmB,CAAA;AACjC,cAAc,WAAW,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,cAAc,SAAS,CAAA;AACvB,cAAc,YAAY,CAAA;AAC1B,cAAc,YAAY,CAAA;AAC1B,cAAc,SAAS,CAAA;AACvB,cAAc,kBAAkB,CAAA;AAChC,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA;AAC5B,cAAc,cAAc,CAAA;AAC5B,cAAc,mBAAmB,CAAA;AACjC,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA"}
|
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,iFAAiF;AACjF,2EAA2E;AAC3E,EAAE;AACF,6EAA6E;AAC7E,8EAA8E;AAC9E,+EAA+E;AAC/E,4EAA4E;AAC5E,gFAAgF;AAChF,iFAAiF;AACjF,mFAAmF;AACnF,2EAA2E;AAC3E,aAAa;AACb,cAAc,SAAS,CAAA;AACvB,cAAc,YAAY,CAAA;AAC1B,cAAc,YAAY,CAAA;AAC1B,cAAc,SAAS,CAAA;AACvB,cAAc,kBAAkB,CAAA;AAChC,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA;AAC5B,cAAc,cAAc,CAAA;AAC5B,cAAc,mBAAmB,CAAA;AACjC,cAAc,WAAW,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,iFAAiF;AACjF,2EAA2E;AAC3E,EAAE;AACF,6EAA6E;AAC7E,8EAA8E;AAC9E,+EAA+E;AAC/E,4EAA4E;AAC5E,gFAAgF;AAChF,iFAAiF;AACjF,mFAAmF;AACnF,2EAA2E;AAC3E,aAAa;AACb,cAAc,SAAS,CAAA;AACvB,cAAc,YAAY,CAAA;AAC1B,cAAc,YAAY,CAAA;AAC1B,cAAc,SAAS,CAAA;AACvB,cAAc,kBAAkB,CAAA;AAChC,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA;AAC5B,cAAc,cAAc,CAAA;AAC5B,cAAc,mBAAmB,CAAA;AACjC,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA"}
|
package/dist/ref.d.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A reference as typed. `repo` is absent for a bare `#N`, which only the
|
|
3
|
+
* caller can expand — it knows which row is active and which repos the inbox
|
|
4
|
+
* holds; this file knows neither.
|
|
5
|
+
*
|
|
6
|
+
* There is deliberately no PR-or-issue flag. A URL says which, but
|
|
7
|
+
* `owner/repo#N` and `#N` do not, and GitHub numbers both from one sequence —
|
|
8
|
+
* so any guess here is a coin toss the fetched node then has to overrule. The
|
|
9
|
+
* first draft of this type carried `isPr: true` for the shorthand forms and
|
|
10
|
+
* opened every issue typed that way as a PR. The node's `__typename` is the
|
|
11
|
+
* only honest answer, and `toGHItem` already reads it.
|
|
12
|
+
*/
|
|
13
|
+
export type ParsedRef = {
|
|
14
|
+
repo?: string;
|
|
15
|
+
number: number;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Parse a PR or issue reference: a github.com URL, `owner/repo#N`, or a bare
|
|
19
|
+
* `#N`. Anything else — a ticket key, a word, a half-typed slug — is `null`,
|
|
20
|
+
* which is how the launcher knows the input is not GitHub's to claim.
|
|
21
|
+
*
|
|
22
|
+
* The repo keeps the case it was typed in, because it is also what the
|
|
23
|
+
* launcher shows back. GitHub matches names case-insensitively, so every
|
|
24
|
+
* comparison against it has to as well.
|
|
25
|
+
*/
|
|
26
|
+
export declare const parseRef: (input: string) => ParsedRef | null;
|
|
27
|
+
/** `owner/repo#N`, or `#N` while the repo is still unknown. */
|
|
28
|
+
export declare const formatRef: (ref: ParsedRef) => string;
|
|
29
|
+
//# sourceMappingURL=ref.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ref.d.ts","sourceRoot":"","sources":["../src/ref.ts"],"names":[],"mappings":"AAQA;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,SAAS,GAAG;IACtB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;CACf,CAAA;AAgBD;;;;;;;;GAQG;AACH,eAAO,MAAM,QAAQ,GAAI,OAAO,MAAM,KAAG,SAAS,GAAG,IAMpD,CAAA;AAED,+DAA+D;AAC/D,eAAO,MAAM,SAAS,GAAI,KAAK,SAAS,KAAG,MACR,CAAA"}
|
package/dist/ref.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// What a pasted GitHub reference points at, read off the text alone.
|
|
2
|
+
//
|
|
3
|
+
// Pure and transport-free on purpose, and exported on its own subpath
|
|
4
|
+
// (`@kud/gh/ref`) for the same reason `health` is: `@kud/gh-workflow` resolves
|
|
5
|
+
// references and must stay importable from a browser bundle, so the thing it
|
|
6
|
+
// parses with cannot drag `execa` in behind it. The fetch half lives in
|
|
7
|
+
// `inbox.ts`, beside the selections it has to share.
|
|
8
|
+
// GitHub's own rules, near enough: owners are alphanumeric and hyphens, repo
|
|
9
|
+
// names add `.` and `_`. Tight on purpose — the launcher calls this on every
|
|
10
|
+
// keystroke, and a loose pattern would claim half-typed ticket keys.
|
|
11
|
+
const SLUG = "([A-Za-z0-9-]+/[A-Za-z0-9_.-]+)";
|
|
12
|
+
// Anything after the number — `/files`, `#issuecomment-…`, `?w=1` — is a view
|
|
13
|
+
// of the same item, so a URL copied from any tab of it still resolves.
|
|
14
|
+
const URL_RE = new RegExp(`^https?://(?:www\\.)?github\\.com/${SLUG}/(?:pull|issues)/(\\d+)(?:[/?#].*)?$`, "i");
|
|
15
|
+
const SHORTHAND_RE = new RegExp(`^${SLUG}#(\\d+)$`);
|
|
16
|
+
const BARE_RE = /^#(\d+)$/;
|
|
17
|
+
/**
|
|
18
|
+
* Parse a PR or issue reference: a github.com URL, `owner/repo#N`, or a bare
|
|
19
|
+
* `#N`. Anything else — a ticket key, a word, a half-typed slug — is `null`,
|
|
20
|
+
* which is how the launcher knows the input is not GitHub's to claim.
|
|
21
|
+
*
|
|
22
|
+
* The repo keeps the case it was typed in, because it is also what the
|
|
23
|
+
* launcher shows back. GitHub matches names case-insensitively, so every
|
|
24
|
+
* comparison against it has to as well.
|
|
25
|
+
*/
|
|
26
|
+
export const parseRef = (input) => {
|
|
27
|
+
const text = input.trim();
|
|
28
|
+
const match = URL_RE.exec(text) ?? SHORTHAND_RE.exec(text);
|
|
29
|
+
if (match)
|
|
30
|
+
return { repo: match[1], number: Number(match[2]) };
|
|
31
|
+
const bare = BARE_RE.exec(text);
|
|
32
|
+
return bare ? { number: Number(bare[1]) } : null;
|
|
33
|
+
};
|
|
34
|
+
/** `owner/repo#N`, or `#N` while the repo is still unknown. */
|
|
35
|
+
export const formatRef = (ref) => `${ref.repo ?? ""}#${ref.number}`;
|
|
36
|
+
//# sourceMappingURL=ref.js.map
|
package/dist/ref.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ref.js","sourceRoot":"","sources":["../src/ref.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,EAAE;AACF,sEAAsE;AACtE,+EAA+E;AAC/E,6EAA6E;AAC7E,wEAAwE;AACxE,qDAAqD;AAmBrD,6EAA6E;AAC7E,6EAA6E;AAC7E,qEAAqE;AACrE,MAAM,IAAI,GAAG,iCAAiC,CAAA;AAE9C,8EAA8E;AAC9E,uEAAuE;AACvE,MAAM,MAAM,GAAG,IAAI,MAAM,CACvB,qCAAqC,IAAI,sCAAsC,EAC/E,GAAG,CACJ,CAAA;AACD,MAAM,YAAY,GAAG,IAAI,MAAM,CAAC,IAAI,IAAI,UAAU,CAAC,CAAA;AACnD,MAAM,OAAO,GAAG,UAAU,CAAA;AAE1B;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,KAAa,EAAoB,EAAE;IAC1D,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,EAAE,CAAA;IACzB,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAC1D,IAAI,KAAK;QAAE,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;IAC9D,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAC/B,OAAO,IAAI,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAA;AAClD,CAAC,CAAA;AAED,+DAA+D;AAC/D,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,GAAc,EAAU,EAAE,CAClD,GAAG,GAAG,CAAC,IAAI,IAAI,EAAE,IAAI,GAAG,CAAC,MAAM,EAAE,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kud/gh",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.21.0",
|
|
4
4
|
"description": "Surface-agnostic GitHub core — gh CLI primitives, PR review comments, health, and webhook logic.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -21,6 +21,10 @@
|
|
|
21
21
|
"./pulse": {
|
|
22
22
|
"import": "./dist/pulse.js",
|
|
23
23
|
"types": "./dist/pulse.d.ts"
|
|
24
|
+
},
|
|
25
|
+
"./ref": {
|
|
26
|
+
"import": "./dist/ref.js",
|
|
27
|
+
"types": "./dist/ref.d.ts"
|
|
24
28
|
}
|
|
25
29
|
},
|
|
26
30
|
"files": [
|