@kud/gh 0.1.0 → 0.3.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.
@@ -0,0 +1,18 @@
1
+ /** A repo-scoped or account-wide inbox. */
2
+ export type InboxQueryOptions = {
3
+ /** `owner/name`. Scopes every search to one repository. */
4
+ repo?: string;
5
+ /** How far back `recentlyDone` looks. Defaults to 14 days. */
6
+ doneWithinDays?: number;
7
+ };
8
+ /**
9
+ * Build the inbox query. Without `repo`, it is account-wide.
10
+ *
11
+ * The two qualifiers do NOT compose. `user:@me` means "in repos I own", and
12
+ * GitHub ANDs search qualifiers — so `user:@me repo:someone-else/x` matches
13
+ * nothing, and a scoped inbox on a repo you contribute to but do not own would
14
+ * render empty and read as "nothing to do here". So `repo:` REPLACES
15
+ * `user:@me` rather than joining it.
16
+ */
17
+ export declare const buildInboxQuery: ({ repo, doneWithinDays, }?: InboxQueryOptions) => string;
18
+ //# sourceMappingURL=inbox.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inbox.d.ts","sourceRoot":"","sources":["../src/inbox.ts"],"names":[],"mappings":"AAQA,2CAA2C;AAC3C,MAAM,MAAM,iBAAiB,GAAG;IAC9B,2DAA2D;IAC3D,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,8DAA8D;IAC9D,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB,CAAA;AA4CD;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe,GAAI,4BAG7B,iBAAsB,WAoFxB,CAAA"}
package/dist/inbox.js ADDED
@@ -0,0 +1,137 @@
1
+ // The inbox query — one GraphQL round-trip for "what is on my plate": my PRs,
2
+ // review requests, reviews I have given, assigned work, issues and PRs on my
3
+ // repos, and what I closed recently.
4
+ //
5
+ // Query-only by design. Assembling the result into sections is the surface's
6
+ // own vocabulary — cockpit splits home from work, a web dashboard may group by
7
+ // project — so nothing here decides what a section is.
8
+ // computeHealth's precedence needs reviewDecision, mergeable and the check
9
+ // rollup. A fragment that omits them does NOT degrade gracefully — it falls
10
+ // straight through to whatever token is left, so a PR you already sent back
11
+ // renders as "awaiting review" and a failing one renders as quiet. Every PR
12
+ // fragment therefore carries the whole set; none of it is optional.
13
+ const PR_HEALTH = `
14
+ isDraft reviewDecision mergeable
15
+ statusCheckRollup { contexts(first: 20) { nodes {
16
+ ... on CheckRun { name conclusion status }
17
+ ... on StatusContext { context state }
18
+ } } }`;
19
+ // Whose turn it is cannot be read off a count, so every comment-bearing edge
20
+ // carries its latest author and timestamp: the conversation, the review bodies,
21
+ // and each thread's last reply. The last commit rides along so a consumer can
22
+ // say whether the author has pushed since being sent back.
23
+ const PR_CONVERSATION = `
24
+ comments(last: 1) { totalCount nodes { author { login } createdAt } }
25
+ reviews(last: 1) { nodes { author { login } state submittedAt } }
26
+ reviewThreads(first: 50) { nodes {
27
+ isResolved
28
+ comments(last: 1) { totalCount nodes { author { login } createdAt } }
29
+ } }
30
+ commits(last: 1) { nodes { commit { committedDate } } }`;
31
+ const ISSUE_CONVERSATION = `
32
+ comments(last: 1) { totalCount nodes { author { login } createdAt } }`;
33
+ // Fetched so a consumer can tell a `plan` issue from any other — which decides
34
+ // what a delegated session gets handed. Nothing here renders labels.
35
+ const ISSUE_LABELS = `
36
+ labels(first: 10) { nodes { name } }`;
37
+ /*
38
+ * Computed per call, never at module scope. A CLI process is short-lived and
39
+ * would not notice, but a long-running server imports this once and keeps it
40
+ * for days — a module-level date would freeze "recently done" to the morning
41
+ * the server booted and quietly stop reporting anything closed since.
42
+ */
43
+ const sinceDay = (days) => new Date(Date.now() - days * 86400 * 1000).toISOString().slice(0, 10);
44
+ /**
45
+ * Build the inbox query. Without `repo`, it is account-wide.
46
+ *
47
+ * The two qualifiers do NOT compose. `user:@me` means "in repos I own", and
48
+ * GitHub ANDs search qualifiers — so `user:@me repo:someone-else/x` matches
49
+ * nothing, and a scoped inbox on a repo you contribute to but do not own would
50
+ * render empty and read as "nothing to do here". So `repo:` REPLACES
51
+ * `user:@me` rather than joining it.
52
+ */
53
+ export const buildInboxQuery = ({ repo, doneWithinDays = 14, } = {}) => {
54
+ const scope = repo ? `repo:${repo} ` : "";
55
+ const owned = repo ? "" : "user:@me ";
56
+ const doneSince = sinceDay(doneWithinDays);
57
+ return `
58
+ {
59
+ viewer { login }
60
+ myPRs: search(query: "${scope}is:pr is:open author:@me", type: ISSUE, first: 100) {
61
+ nodes { __typename ... on PullRequest {
62
+ number title createdAt url headRefName
63
+ repository { nameWithOwner }
64
+ ${PR_HEALTH}
65
+ ${PR_CONVERSATION}
66
+ }}
67
+ }
68
+ reviewRequests: search(query: "${scope}is:pr is:open review-requested:@me", type: ISSUE, first: 20) {
69
+ nodes { __typename ... on PullRequest {
70
+ number title createdAt url headRefName
71
+ repository { nameWithOwner }
72
+ author { login }
73
+ ${PR_HEALTH}
74
+ ${PR_CONVERSATION}
75
+ }}
76
+ }
77
+ reviewed: search(query: "${scope}is:pr is:open reviewed-by:@me -author:@me -review-requested:@me", type: ISSUE, first: 20) {
78
+ nodes { __typename ... on PullRequest {
79
+ number title createdAt url headRefName
80
+ repository { nameWithOwner }
81
+ author { login }
82
+ ${PR_HEALTH}
83
+ ${PR_CONVERSATION}
84
+ }}
85
+ }
86
+ assigned: search(query: "${scope}is:open assignee:@me", type: ISSUE, first: 30) {
87
+ nodes {
88
+ __typename
89
+ ... on Issue {
90
+ number title createdAt url repository { nameWithOwner } author { login }
91
+ ${ISSUE_CONVERSATION}
92
+ ${ISSUE_LABELS}
93
+ }
94
+ ... on PullRequest {
95
+ number title createdAt url headRefName repository { nameWithOwner } author { login }
96
+ ${PR_HEALTH}
97
+ ${PR_CONVERSATION}
98
+ }
99
+ }
100
+ }
101
+ repoIssues: search(query: "${scope}${owned}is:issue is:open archived:false", type: ISSUE, first: 30) {
102
+ nodes { __typename ... on Issue {
103
+ number title createdAt url
104
+ repository { nameWithOwner }
105
+ author { login }
106
+ ${ISSUE_CONVERSATION}
107
+ ${ISSUE_LABELS}
108
+ }}
109
+ }
110
+ authoredIssues: search(query: "${scope}is:issue is:open author:@me archived:false", type: ISSUE, first: 30) {
111
+ nodes { ... on Issue {
112
+ number title createdAt url
113
+ repository { nameWithOwner }
114
+ author { login }
115
+ ${ISSUE_CONVERSATION}
116
+ ${ISSUE_LABELS}
117
+ }}
118
+ }
119
+ repoPRs: search(query: "${scope}${owned}is:pr is:open -author:@me archived:false", type: ISSUE, first: 30) {
120
+ nodes { __typename ... on PullRequest {
121
+ number title createdAt url headRefName
122
+ repository { nameWithOwner }
123
+ author { login }
124
+ ${PR_HEALTH}
125
+ ${PR_CONVERSATION}
126
+ }}
127
+ }
128
+ recentlyDone: search(query: "${scope}is:pr author:@me -is:open closed:>=${doneSince}", type: ISSUE, first: 30) {
129
+ nodes { __typename ... on PullRequest {
130
+ number title state isDraft createdAt mergedAt closedAt url
131
+ repository { nameWithOwner }
132
+ }}
133
+ }
134
+ }
135
+ `;
136
+ };
137
+ //# sourceMappingURL=inbox.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inbox.js","sourceRoot":"","sources":["../src/inbox.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,6EAA6E;AAC7E,qCAAqC;AACrC,EAAE;AACF,6EAA6E;AAC7E,+EAA+E;AAC/E,uDAAuD;AAUvD,2EAA2E;AAC3E,4EAA4E;AAC5E,4EAA4E;AAC5E,4EAA4E;AAC5E,oEAAoE;AACpE,MAAM,SAAS,GAAG;;;;;YAKN,CAAA;AAEZ,6EAA6E;AAC7E,gFAAgF;AAChF,8EAA8E;AAC9E,2DAA2D;AAC3D,MAAM,eAAe,GAAG;;;;;;;8DAOsC,CAAA;AAE9D,MAAM,kBAAkB,GAAG;4EACiD,CAAA;AAE5E,+EAA+E;AAC/E,qEAAqE;AACrE,MAAM,YAAY,GAAG;2CACsB,CAAA;AAE3C;;;;;GAKG;AACH,MAAM,QAAQ,GAAG,CAAC,IAAY,EAAE,EAAE,CAChC,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,GAAG,KAAK,GAAG,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;AAEvE;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,EAC9B,IAAI,EACJ,cAAc,GAAG,EAAE,MACE,EAAE,EAAE,EAAE;IAC3B,MAAM,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC,QAAQ,IAAI,GAAG,CAAC,CAAC,CAAC,EAAE,CAAA;IACzC,MAAM,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,CAAA;IACrC,MAAM,SAAS,GAAG,QAAQ,CAAC,cAAc,CAAC,CAAA;IAE1C,OAAO;;;0BAGiB,KAAK;;;;QAIvB,SAAS;QACT,eAAe;;;mCAGY,KAAK;;;;;QAKhC,SAAS;QACT,eAAe;;;6BAGM,KAAK;;;;;QAK1B,SAAS;QACT,eAAe;;;6BAGM,KAAK;;;;;UAKxB,kBAAkB;UAClB,YAAY;;;;UAIZ,SAAS;UACT,eAAe;;;;+BAIM,KAAK,GAAG,KAAK;;;;;QAKpC,kBAAkB;QAClB,YAAY;;;mCAGe,KAAK;;;;;QAKhC,kBAAkB;QAClB,YAAY;;;4BAGQ,KAAK,GAAG,KAAK;;;;;QAKjC,SAAS;QACT,eAAe;;;iCAGU,KAAK,sCAAsC,SAAS;;;;;;;CAOpF,CAAA;AACD,CAAC,CAAA"}
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export * from "./gh.js";
2
+ export * from "./inbox.js";
2
3
  export * from "./pr.js";
3
4
  export * from "./pr-comments.js";
4
5
  export * from "./health.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA;AACvB,cAAc,kBAAkB,CAAA;AAChC,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA;AAC5B,cAAc,cAAc,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,SAAS,CAAA;AACvB,cAAc,kBAAkB,CAAA;AAChC,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA;AAC5B,cAAc,cAAc,CAAA"}
package/dist/index.js CHANGED
@@ -12,6 +12,7 @@
12
12
  // The deciding test is "is there a query to optimise?": yes → gh api; no →
13
13
  // porcelain.
14
14
  export * from "./gh.js";
15
+ export * from "./inbox.js";
15
16
  export * from "./pr.js";
16
17
  export * from "./pr-comments.js";
17
18
  export * from "./health.js";
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,SAAS,CAAA;AACvB,cAAc,kBAAkB,CAAA;AAChC,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA;AAC5B,cAAc,cAAc,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,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M,eAAe,GAC1B,OAAO,MAAM,EACb,MAAM,MAAM,EACZ,QAAQ,MAAM,KACb,OAAO,CAAC,UAAU,CAoCpB,CAAA;AAED,eAAO,MAAM,aAAa,GACxB,SAAS,oBAAoB,KAC5B,OAAO,CAAC,IAAI,CAId,CAAA;AAED,eAAO,MAAM,aAAa,GAAU,UAAU,MAAM,KAAG,OAAO,CAAC,OAAO,CAKrE,CAAA;AAED,eAAO,MAAM,eAAe,GAAU,UAAU,MAAM,KAAG,OAAO,CAAC,OAAO,CAMvE,CAAA"}
@@ -4,7 +4,10 @@ const FETCH_PR_COMMENTS_QUERY = `
4
4
  repository(owner:$owner, name:$name) {
5
5
  pullRequest(number:$number) {
6
6
  headRefName
7
- comments(first: 50) { nodes { author { login } body } }
7
+ body
8
+ author { login }
9
+ createdAt
10
+ comments(first: 50) { nodes { author { login } body createdAt } }
8
11
  reviewThreads(first: 100) {
9
12
  nodes {
10
13
  id path line originalLine isResolved isOutdated
@@ -35,6 +38,7 @@ const authorLogin = (author) => author?.login ?? "ghost";
35
38
  const mapConversationComment = (node) => ({
36
39
  author: authorLogin(node.author),
37
40
  body: node.body.trim(),
41
+ createdAt: node.createdAt,
38
42
  });
39
43
  const mapThreadComment = (node) => ({
40
44
  author: authorLogin(node.author),
@@ -64,9 +68,23 @@ export const fetchPrComments = async (owner, name, number) => {
64
68
  if (!pullRequest) {
65
69
  throw new Error(`pull request not found: ${owner}/${name}#${number}`);
66
70
  }
71
+ // The description leads the conversation, the way GitHub's own Conversation
72
+ // tab treats it: a PR whose body carries its whole argument otherwise renders
73
+ // as having nothing said on it, which reads as empty rather than unanswered.
74
+ const description = (pullRequest.body ?? "").trim();
75
+ const conversation = pullRequest.comments.nodes.map(mapConversationComment);
67
76
  return {
68
77
  headRef: pullRequest.headRefName ?? "HEAD",
69
- conversation: pullRequest.comments.nodes.map(mapConversationComment),
78
+ conversation: description
79
+ ? [
80
+ {
81
+ author: authorLogin(pullRequest.author),
82
+ body: description,
83
+ createdAt: pullRequest.createdAt,
84
+ },
85
+ ...conversation,
86
+ ]
87
+ : conversation,
70
88
  threads: pullRequest.reviewThreads.nodes.map(mapReviewThread),
71
89
  };
72
90
  };
@@ -1 +1 @@
1
- {"version":3,"file":"pr-comments.js","sourceRoot":"","sources":["../src/pr-comments.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAiF3C,MAAM,uBAAuB,GAAG;;;;;;;;;;;;;;;;;CAiB/B,CAAA;AAED,MAAM,uBAAuB,GAAG;;;;;;CAM/B,CAAA;AAED,MAAM,yBAAyB,GAAG;;;;;;CAMjC,CAAA;AAED,MAAM,WAAW,GAAG,CAAC,MAAgB,EAAU,EAAE,CAAC,MAAM,EAAE,KAAK,IAAI,OAAO,CAAA;AAE1E,MAAM,sBAAsB,GAAG,CAAC,IAA6B,EAAW,EAAE,CAAC,CAAC;IAC1E,MAAM,EAAE,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC;IAChC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;CACvB,CAAC,CAAA;AAEF,MAAM,gBAAgB,GAAG,CAAC,IAAuB,EAAW,EAAE,CAAC,CAAC;IAC9D,MAAM,EAAE,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC;IAChC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;IACtB,UAAU,EAAE,IAAI,CAAC,UAAU;IAC3B,GAAG,EAAE,IAAI,CAAC,GAAG;IACb,IAAI,EAAE,IAAI,CAAC,IAAI;IACf,QAAQ,EAAE,IAAI,CAAC,QAAQ;IACvB,SAAS,EAAE,IAAI,CAAC,SAAS;CAC1B,CAAC,CAAA;AAEF,MAAM,eAAe,GAAG,CAAC,IAAsB,EAAgB,EAAE,CAAC,CAAC;IACjE,EAAE,EAAE,IAAI,CAAC,EAAE;IACX,IAAI,EAAE,IAAI,CAAC,IAAI;IACf,IAAI,EAAE,IAAI,CAA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AC;gBACE;oBACE,MAAM,EAAE,WAAW,CAAC,WAAW,CAAC,MAAM,CAAC;oBACvC,IAAI,EAAE,WAAW;oBACjB,SAAS,EAAE,WAAW,CAAC,SAAS;iBACjC;gBACD,GAAG,YAAY;aAChB;YACH,CAAC,CAAC,YAAY;QAChB,OAAO,EAAE,WAAW,CAAC,aAAa,CAAC,KAAK,CAAC,GAAG,CAAC,eAAe,CAAC;KAC9D,CAAA;AACH,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,aAAa,GAAG,KAAK,EAChC,OAA6B,EACd,EAAE;IACjB,MAAM,MAAM,CAAC,SAAS,OAAO,CAAC,IAAI,UAAU,OAAO,CAAC,IAAI,WAAW,EAAE;QACnE,MAAM,EAAE,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,WAAW,EAAE,OAAO,CAAC,SAAS,EAAE;KAC/D,CAAC,CAAA;AACJ,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,aAAa,GAAG,KAAK,EAAE,QAAgB,EAAoB,EAAE;IACxE,MAAM,IAAI,GAAG,MAAM,SAAS,CAAwB,uBAAuB,EAAE;QAC3E,QAAQ;KACT,CAAC,CAAA;IACF,OAAO,IAAI,CAAC,mBAAmB,CAAC,MAAM,CAAC,UAAU,CAAA;AACnD,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,eAAe,GAAG,KAAK,EAAE,QAAgB,EAAoB,EAAE;IAC1E,MAAM,IAAI,GAAG,MAAM,SAAS,CAC1B,yBAAyB,EACzB,EAAE,QAAQ,EAAE,CACb,CAAA;IACD,OAAO,IAAI,CAAC,qBAAqB,CAAC,MAAM,CAAC,UAAU,CAAA;AACrD,CAAC,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kud/gh",
3
- "version": "0.1.0",
3
+ "version": "0.3.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",