@theholocron/github-client 1.32.1 → 1.33.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/index.d.mts +13 -0
- package/dist/index.mjs +7 -1
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -276,6 +276,19 @@ interface ReviewThread {
|
|
|
276
276
|
isResolved: boolean;
|
|
277
277
|
/** The thread's first comment's author login (e.g. `"the-holocron-sentinel[bot]"`) — `undefined` if GitHub ever returns a thread with no comments, which shouldn't happen in practice. Callers filter on this before resolving anything, so a bot never touches a human reviewer's own thread. */
|
|
278
278
|
authorLogin: string | undefined;
|
|
279
|
+
/** The file the thread is anchored to on the PR's current diff — `null` once GitHub can no longer place it there (e.g. the file was since deleted). */
|
|
280
|
+
path: string | null;
|
|
281
|
+
/** 1-indexed line the thread is anchored to — `null` in the same "can no longer place it" case as `path`. */
|
|
282
|
+
line: number | null;
|
|
283
|
+
/**
|
|
284
|
+
* The thread's first comment's own body — the exact text a caller like
|
|
285
|
+
* Sentinel posted for a specific finding. Lets a caller diff a prior
|
|
286
|
+
* thread's own content against the current push's findings (holocron#860)
|
|
287
|
+
* to decide whether that finding is still live, rather than only knowing
|
|
288
|
+
* a thread exists. `undefined` in the same no-comments case as
|
|
289
|
+
* `authorLogin`.
|
|
290
|
+
*/
|
|
291
|
+
body: string | undefined;
|
|
279
292
|
}
|
|
280
293
|
//#endregion
|
|
281
294
|
//#region ../../../../../src/repos/repos.d.ts
|
package/dist/index.mjs
CHANGED
|
@@ -276,9 +276,12 @@ const LIST_REVIEW_THREADS_QUERY = `
|
|
|
276
276
|
nodes {
|
|
277
277
|
id
|
|
278
278
|
isResolved
|
|
279
|
+
path
|
|
280
|
+
line
|
|
279
281
|
comments(first: 1) {
|
|
280
282
|
nodes {
|
|
281
283
|
author { login }
|
|
284
|
+
body
|
|
282
285
|
}
|
|
283
286
|
}
|
|
284
287
|
}
|
|
@@ -331,7 +334,10 @@ function pulls(rest, graphql) {
|
|
|
331
334
|
})).repository.pullRequest.reviewThreads.nodes.map((node) => ({
|
|
332
335
|
id: node.id,
|
|
333
336
|
isResolved: node.isResolved,
|
|
334
|
-
|
|
337
|
+
path: node.path,
|
|
338
|
+
line: node.line,
|
|
339
|
+
authorLogin: node.comments.nodes[0]?.author?.login,
|
|
340
|
+
body: node.comments.nodes[0]?.body
|
|
335
341
|
}));
|
|
336
342
|
},
|
|
337
343
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theholocron/github-client",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.33.0",
|
|
4
4
|
"description": "A TypeScript client for the GitHub REST API",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"github",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@theholocron/observability": "^0.3.0",
|
|
36
|
-
"@theholocron/http-client": "^1.
|
|
36
|
+
"@theholocron/http-client": "^1.33.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@theholocron/cli": "5.0.0-alpha.79",
|