@blogic-cz/agent-tools 1.7.4 → 1.8.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 +2 -1
- package/dist/db-tool/service.d.ts.map +1 -1
- package/dist/gh-tool/branch.d.ts +2 -3
- package/dist/gh-tool/branch.d.ts.map +1 -1
- package/dist/gh-tool/environment.d.ts +1 -1
- package/dist/gh-tool/environment.d.ts.map +1 -1
- package/dist/gh-tool/gist.d.ts +8 -28
- package/dist/gh-tool/gist.d.ts.map +1 -1
- package/dist/gh-tool/issue/commands.d.ts +9 -9
- package/dist/gh-tool/issue/commands.d.ts.map +1 -1
- package/dist/gh-tool/issue/core.d.ts +103 -9
- package/dist/gh-tool/issue/core.d.ts.map +1 -1
- package/dist/gh-tool/issue/triage.d.ts +6 -6
- package/dist/gh-tool/issue/triage.d.ts.map +1 -1
- package/dist/gh-tool/pr/commands.d.ts +53 -46
- package/dist/gh-tool/pr/commands.d.ts.map +1 -1
- package/dist/gh-tool/pr/core.d.ts +179 -74
- package/dist/gh-tool/pr/core.d.ts.map +1 -1
- package/dist/gh-tool/pr/review.d.ts +16 -16
- package/dist/gh-tool/pr/review.d.ts.map +1 -1
- package/dist/gh-tool/pr/snapshot.d.ts +9 -0
- package/dist/gh-tool/pr/snapshot.d.ts.map +1 -0
- package/dist/gh-tool/pr/stack-read.d.ts +1 -6
- package/dist/gh-tool/pr/stack-read.d.ts.map +1 -1
- package/dist/gh-tool/pr/stack.d.ts +3 -3
- package/dist/gh-tool/pr/stack.d.ts.map +1 -1
- package/dist/gh-tool/{api.d.ts → read/api.d.ts} +9 -3
- package/dist/gh-tool/read/api.d.ts.map +1 -0
- package/dist/gh-tool/read/cache.d.ts +44 -0
- package/dist/gh-tool/read/cache.d.ts.map +1 -0
- package/dist/gh-tool/read/catalog.d.ts +170 -0
- package/dist/gh-tool/read/catalog.d.ts.map +1 -0
- package/dist/gh-tool/read/classes.d.ts +94 -0
- package/dist/gh-tool/read/classes.d.ts.map +1 -0
- package/dist/gh-tool/read/commands.d.ts +3 -0
- package/dist/gh-tool/read/commands.d.ts.map +1 -0
- package/dist/gh-tool/read/gated.d.ts +14 -0
- package/dist/gh-tool/read/gated.d.ts.map +1 -0
- package/dist/gh-tool/read/index.d.ts +5 -0
- package/dist/gh-tool/read/index.d.ts.map +1 -0
- package/dist/gh-tool/read/issues.d.ts +68 -0
- package/dist/gh-tool/read/issues.d.ts.map +1 -0
- package/dist/gh-tool/read/keys.d.ts +61 -0
- package/dist/gh-tool/read/keys.d.ts.map +1 -0
- package/dist/gh-tool/read/porcelain.d.ts +68 -0
- package/dist/gh-tool/read/porcelain.d.ts.map +1 -0
- package/dist/gh-tool/read/pulls.d.ts +137 -0
- package/dist/gh-tool/read/pulls.d.ts.map +1 -0
- package/dist/gh-tool/read/reads.d.ts +209 -0
- package/dist/gh-tool/read/reads.d.ts.map +1 -0
- package/dist/gh-tool/read/rest.d.ts +49 -0
- package/dist/gh-tool/read/rest.d.ts.map +1 -0
- package/dist/gh-tool/read/review-guards.d.ts +20 -0
- package/dist/gh-tool/read/review-guards.d.ts.map +1 -0
- package/dist/gh-tool/read/review-model.d.ts +190 -0
- package/dist/gh-tool/read/review-model.d.ts.map +1 -0
- package/dist/gh-tool/read/reviews.d.ts +9 -0
- package/dist/gh-tool/read/reviews.d.ts.map +1 -0
- package/dist/gh-tool/read/stacks.d.ts +7 -0
- package/dist/gh-tool/read/stacks.d.ts.map +1 -0
- package/dist/gh-tool/read/store.d.ts +70 -0
- package/dist/gh-tool/read/store.d.ts.map +1 -0
- package/dist/gh-tool/{service.d.ts → read/transport.d.ts} +5 -3
- package/dist/gh-tool/read/transport.d.ts.map +1 -0
- package/dist/gh-tool/read/waits.d.ts +22 -0
- package/dist/gh-tool/read/waits.d.ts.map +1 -0
- package/dist/gh-tool/read/writes.d.ts +16 -0
- package/dist/gh-tool/read/writes.d.ts.map +1 -0
- package/dist/gh-tool/release.d.ts +10 -26
- package/dist/gh-tool/release.d.ts.map +1 -1
- package/dist/gh-tool/repo.d.ts +4 -4
- package/dist/gh-tool/repo.d.ts.map +1 -1
- package/dist/gh-tool/types.d.ts +1 -1
- package/dist/gh-tool/types.d.ts.map +1 -1
- package/dist/gh-tool/workflow.d.ts +43 -21
- package/dist/gh-tool/workflow.d.ts.map +1 -1
- package/dist/observability-tool/shared.d.ts.map +1 -1
- package/dist/shared/content-security.d.ts +2 -0
- package/dist/shared/content-security.d.ts.map +1 -1
- package/package.json +6 -6
- package/src/api-tool/proxy-entry.ts +3 -1
- package/src/db-tool/service.ts +4 -1
- package/src/gh-tool/branch.ts +5 -8
- package/src/gh-tool/environment.ts +2 -1
- package/src/gh-tool/gist.ts +8 -35
- package/src/gh-tool/issue/commands.ts +1 -1
- package/src/gh-tool/issue/core.ts +55 -122
- package/src/gh-tool/issue/triage.ts +4 -26
- package/src/gh-tool/main.ts +5 -2
- package/src/gh-tool/pr/commands.ts +19 -23
- package/src/gh-tool/pr/core.ts +542 -582
- package/src/gh-tool/pr/review.ts +106 -454
- package/src/gh-tool/pr/snapshot.ts +23 -0
- package/src/gh-tool/pr/stack-read.ts +1 -73
- package/src/gh-tool/pr/stack.ts +37 -36
- package/src/gh-tool/{api.ts → read/api.ts} +40 -7
- package/src/gh-tool/read/cache.ts +192 -0
- package/src/gh-tool/read/catalog.ts +310 -0
- package/src/gh-tool/read/classes.ts +30 -0
- package/src/gh-tool/read/commands.ts +25 -0
- package/src/gh-tool/read/gated.ts +56 -0
- package/src/gh-tool/read/index.ts +4 -0
- package/src/gh-tool/read/issues.ts +107 -0
- package/src/gh-tool/read/keys.ts +102 -0
- package/src/gh-tool/read/porcelain.ts +58 -0
- package/src/gh-tool/read/pulls.ts +266 -0
- package/src/gh-tool/read/reads.ts +306 -0
- package/src/gh-tool/read/rest.ts +111 -0
- package/src/gh-tool/read/review-guards.ts +61 -0
- package/src/gh-tool/read/review-model.ts +286 -0
- package/src/gh-tool/read/reviews.ts +114 -0
- package/src/gh-tool/read/stacks.ts +73 -0
- package/src/gh-tool/read/store.ts +504 -0
- package/src/gh-tool/{service.ts → read/transport.ts} +26 -6
- package/src/gh-tool/read/waits.ts +52 -0
- package/src/gh-tool/read/writes.ts +37 -0
- package/src/gh-tool/release.ts +15 -168
- package/src/gh-tool/repo.ts +5 -78
- package/src/gh-tool/types.ts +1 -1
- package/src/gh-tool/workflow.ts +123 -214
- package/src/observability-tool/shared.ts +2 -1
- package/src/shared/content-security.ts +10 -1
- package/src/shared/credential-patterns.ts +1 -1
- package/dist/gh-tool/api.d.ts.map +0 -1
- package/dist/gh-tool/pr/check-status-cache.d.ts +0 -6
- package/dist/gh-tool/pr/check-status-cache.d.ts.map +0 -1
- package/dist/gh-tool/service.d.ts.map +0 -1
- package/src/gh-tool/pr/check-status-cache.ts +0 -142
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { Effect, Schema } from "effect";
|
|
2
|
+
import { GitHubService } from "#gh/read/transport";
|
|
3
|
+
import type { CheckResult } from "#gh/types";
|
|
4
|
+
import type { RepoRef } from "./keys";
|
|
5
|
+
export declare const PR_VIEW_FIELDS = "number,url,title,headRefName,baseRefName,headRefOid,state,isDraft,mergeable,body,author,reviewDecision,reviewRequests,createdAt,headRepositoryOwner,mergeCommit";
|
|
6
|
+
export declare const PR_LIST_FIELDS = "number,url,title,headRefName,baseRefName,state,isDraft,mergeable,author,createdAt,reviewDecision,headRepositoryOwner";
|
|
7
|
+
export type PrListFilter = {
|
|
8
|
+
state: string;
|
|
9
|
+
limit: number;
|
|
10
|
+
author: string | null;
|
|
11
|
+
base: string | null;
|
|
12
|
+
head: string | null;
|
|
13
|
+
search: string | null;
|
|
14
|
+
};
|
|
15
|
+
export type PrSelector = {
|
|
16
|
+
by: "number";
|
|
17
|
+
number: number;
|
|
18
|
+
} | {
|
|
19
|
+
by: "currentBranch";
|
|
20
|
+
};
|
|
21
|
+
declare const Pull: Schema.Struct<{
|
|
22
|
+
readonly number: Schema.Number;
|
|
23
|
+
readonly url: Schema.String;
|
|
24
|
+
readonly title: Schema.String;
|
|
25
|
+
readonly headRefName: Schema.String;
|
|
26
|
+
readonly baseRefName: Schema.String;
|
|
27
|
+
readonly state: Schema.String;
|
|
28
|
+
readonly isDraft: Schema.Boolean;
|
|
29
|
+
readonly mergeable: Schema.Literals<readonly ["MERGEABLE", "CONFLICTING", "UNKNOWN"]>;
|
|
30
|
+
readonly author: Schema.optional<Schema.Struct<{
|
|
31
|
+
readonly login: Schema.String;
|
|
32
|
+
readonly is_bot: Schema.optional<Schema.Boolean>;
|
|
33
|
+
}>>;
|
|
34
|
+
readonly createdAt: Schema.optional<Schema.String>;
|
|
35
|
+
readonly reviewDecision: Schema.optional<Schema.String>;
|
|
36
|
+
readonly headRepositoryOwner: Schema.optional<Schema.Struct<{
|
|
37
|
+
readonly login: Schema.String;
|
|
38
|
+
}>>;
|
|
39
|
+
}>;
|
|
40
|
+
declare const PullView: Schema.Struct<{
|
|
41
|
+
readonly number: Schema.Number;
|
|
42
|
+
readonly url: Schema.String;
|
|
43
|
+
readonly title: Schema.String;
|
|
44
|
+
readonly headRefName: Schema.String;
|
|
45
|
+
readonly baseRefName: Schema.String;
|
|
46
|
+
readonly state: Schema.String;
|
|
47
|
+
readonly isDraft: Schema.Boolean;
|
|
48
|
+
readonly mergeable: Schema.Literals<readonly ["MERGEABLE", "CONFLICTING", "UNKNOWN"]>;
|
|
49
|
+
readonly createdAt: Schema.optional<Schema.String>;
|
|
50
|
+
readonly headRepositoryOwner: Schema.optional<Schema.Struct<{
|
|
51
|
+
readonly login: Schema.String;
|
|
52
|
+
}>>;
|
|
53
|
+
readonly headRefOid: Schema.optional<Schema.String>;
|
|
54
|
+
readonly headSha: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
55
|
+
readonly baseSha: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
56
|
+
readonly body: Schema.String;
|
|
57
|
+
readonly author: Schema.Struct<{
|
|
58
|
+
readonly login: Schema.String;
|
|
59
|
+
readonly is_bot: Schema.Boolean;
|
|
60
|
+
}>;
|
|
61
|
+
readonly reviewDecision: Schema.Literals<readonly ["APPROVED", "CHANGES_REQUESTED", "REVIEW_REQUIRED", ""]>;
|
|
62
|
+
readonly reviewRequests: Schema.mutable<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
63
|
+
readonly __typename: Schema.Literal<"User">;
|
|
64
|
+
readonly login: Schema.String;
|
|
65
|
+
}>, Schema.Struct<{
|
|
66
|
+
readonly __typename: Schema.Literal<"Team">;
|
|
67
|
+
readonly name: Schema.String;
|
|
68
|
+
readonly slug: Schema.String;
|
|
69
|
+
}>]>>>;
|
|
70
|
+
readonly mergeCommit: Schema.optional<Schema.NullOr<Schema.Struct<{
|
|
71
|
+
readonly oid: Schema.String;
|
|
72
|
+
}>>>;
|
|
73
|
+
}>;
|
|
74
|
+
export type PrView = typeof PullView.Type;
|
|
75
|
+
export type PrListItem = typeof Pull.Type;
|
|
76
|
+
export declare const prHead: (repo: RepoRef, pr: number, consistency?: "cached" | "origin" | undefined) => Effect.Effect<{
|
|
77
|
+
headSha: string;
|
|
78
|
+
baseSha: string;
|
|
79
|
+
signature: string;
|
|
80
|
+
}, import("#gh/read/transport").GhError, GitHubService>;
|
|
81
|
+
export declare const checkSignal: (repo: RepoRef, sha: string) => Effect.Effect<string, import("#gh/read/transport").GhError, GitHubService>;
|
|
82
|
+
export declare const prView: (repo: RepoRef | null, selector: PrSelector, consistency?: "cached" | "origin" | undefined) => Effect.Effect<{
|
|
83
|
+
readonly number: number;
|
|
84
|
+
readonly url: string;
|
|
85
|
+
readonly title: string;
|
|
86
|
+
readonly headRefName: string;
|
|
87
|
+
readonly baseRefName: string;
|
|
88
|
+
readonly state: string;
|
|
89
|
+
readonly isDraft: boolean;
|
|
90
|
+
readonly mergeable: "CONFLICTING" | "MERGEABLE" | "UNKNOWN";
|
|
91
|
+
readonly createdAt?: string | undefined;
|
|
92
|
+
readonly headRepositoryOwner?: {
|
|
93
|
+
readonly login: string;
|
|
94
|
+
} | undefined;
|
|
95
|
+
readonly headRefOid?: string | undefined;
|
|
96
|
+
readonly headSha?: string | null | undefined;
|
|
97
|
+
readonly baseSha?: string | null | undefined;
|
|
98
|
+
readonly body: string;
|
|
99
|
+
readonly author: {
|
|
100
|
+
readonly login: string;
|
|
101
|
+
readonly is_bot: boolean;
|
|
102
|
+
};
|
|
103
|
+
readonly reviewDecision: "" | "APPROVED" | "CHANGES_REQUESTED" | "REVIEW_REQUIRED";
|
|
104
|
+
readonly reviewRequests: ({
|
|
105
|
+
readonly __typename: "User";
|
|
106
|
+
readonly login: string;
|
|
107
|
+
} | {
|
|
108
|
+
readonly __typename: "Team";
|
|
109
|
+
readonly name: string;
|
|
110
|
+
readonly slug: string;
|
|
111
|
+
})[];
|
|
112
|
+
readonly mergeCommit?: {
|
|
113
|
+
readonly oid: string;
|
|
114
|
+
} | null | undefined;
|
|
115
|
+
}, import("#gh/read/transport").GhError, GitHubService>;
|
|
116
|
+
export declare const prList: (repo: RepoRef, filter: PrListFilter, consistency?: "cached" | "origin" | undefined) => Effect.Effect<{
|
|
117
|
+
readonly number: number;
|
|
118
|
+
readonly url: string;
|
|
119
|
+
readonly title: string;
|
|
120
|
+
readonly headRefName: string;
|
|
121
|
+
readonly baseRefName: string;
|
|
122
|
+
readonly state: string;
|
|
123
|
+
readonly isDraft: boolean;
|
|
124
|
+
readonly mergeable: "CONFLICTING" | "MERGEABLE" | "UNKNOWN";
|
|
125
|
+
readonly author?: {
|
|
126
|
+
readonly login: string;
|
|
127
|
+
readonly is_bot?: boolean | undefined;
|
|
128
|
+
} | undefined;
|
|
129
|
+
readonly createdAt?: string | undefined;
|
|
130
|
+
readonly reviewDecision?: string | undefined;
|
|
131
|
+
readonly headRepositoryOwner?: {
|
|
132
|
+
readonly login: string;
|
|
133
|
+
} | undefined;
|
|
134
|
+
}[], import("#gh/read/transport").GhError, GitHubService>;
|
|
135
|
+
export declare const prChecks: (repo: RepoRef, pr: number | null, headSha: string | null) => Effect.Effect<CheckResult[], import("#gh/read/transport").GhError, GitHubService>;
|
|
136
|
+
export {};
|
|
137
|
+
//# sourceMappingURL=pulls.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pulls.d.ts","sourceRoot":"","sources":["../../../src/gh-tool/read/pulls.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAO7C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAGtC,eAAO,MAAM,cAAc,oKACwI,CAAC;AACpK,eAAO,MAAM,cAAc,yHAC6F,CAAC;AACzH,MAAM,MAAM,YAAY,GAAG;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB,CAAC;AACF,MAAM,MAAM,UAAU,GAAG;IAAE,EAAE,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,eAAe,CAAA;CAAE,CAAC;AACpF,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;EAeR,CAAC;AAEH,QAAA,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqBZ,CAAC;AACH,MAAM,MAAM,MAAM,GAAG,OAAO,QAAQ,CAAC,IAAI,CAAC;AAC1C,MAAM,MAAM,UAAU,GAAG,OAAO,IAAI,CAAC,IAAI,CAAC;AAQ1C,eAAO,MAAM,MAAM;;;;uDA2BjB,CAAC;AAEH,eAAO,MAAM,WAAW,4GAkBtB,CAAC;AAEH,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uDAsCjB,CAAC;AAEH,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;yDAmCjB,CAAC;AAEH,eAAO,MAAM,QAAQ,iJAwDnB,CAAC"}
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
import { Effect } from "effect";
|
|
2
|
+
import { GitHubService } from "#gh/read/transport";
|
|
3
|
+
import { GitHubCommandError } from "#gh/errors";
|
|
4
|
+
import type { RepoRef, RunFilter } from "./keys";
|
|
5
|
+
export type JobRef = {
|
|
6
|
+
readonly id: number;
|
|
7
|
+
readonly status: string;
|
|
8
|
+
};
|
|
9
|
+
export declare const resolveRepo: (repo: string | null) => Effect.Effect<RepoRef, import("#gh/read/transport").GhError, GitHubService>;
|
|
10
|
+
export declare const rawJobLog: (path: string) => Effect.Effect<import("#gh/read/transport").GhResult, import("#gh/read/transport").GhError, GitHubService>;
|
|
11
|
+
export declare const reads: {
|
|
12
|
+
completedAttemptJobs: (repo: RepoRef, runId: number, attempt: number) => Effect.Effect<{
|
|
13
|
+
readonly id: number;
|
|
14
|
+
readonly name: string;
|
|
15
|
+
}[], import("#gh/read/transport").GhError, GitHubService>;
|
|
16
|
+
jobIdentity: (repo: RepoRef, jobId: number) => Effect.Effect<{
|
|
17
|
+
readonly runId: number;
|
|
18
|
+
readonly attempt: number;
|
|
19
|
+
} | null, import("#gh/errors").GitHubAuthError | GitHubCommandError, GitHubService>;
|
|
20
|
+
reviewGuards: {
|
|
21
|
+
requestedReviewers: (repo: RepoRef, pr: number) => Effect.Effect<{
|
|
22
|
+
requested_reviewers?: unknown;
|
|
23
|
+
}, import("#gh/read/transport").GhError, GitHubService>;
|
|
24
|
+
commentById: (commentId: number) => Effect.Effect<import("./review-model").ReviewCommentById, import("#gh/read/transport").GhError, GitHubService>;
|
|
25
|
+
editableComment: (repo: RepoRef, kind: "review" | "issue", commentId: number) => Effect.Effect<import("./review-model").EditableComment, import("#gh/read/transport").GhError, GitHubService>;
|
|
26
|
+
viewer: () => Effect.Effect<{
|
|
27
|
+
login: string;
|
|
28
|
+
}, import("#gh/read/transport").GhError, GitHubService>;
|
|
29
|
+
pullNumber: (repo: RepoRef, pr: number) => Effect.Effect<{
|
|
30
|
+
number: number;
|
|
31
|
+
}, import("#gh/read/transport").GhError, GitHubService>;
|
|
32
|
+
pendingReviews: (repo: RepoRef, pr: number, after: string | null) => Effect.Effect<unknown, import("#gh/read/transport").GhError, GitHubService>;
|
|
33
|
+
pendingReviewContent: (reviewId: string, after: string | null) => Effect.Effect<unknown, import("#gh/read/transport").GhError, GitHubService>;
|
|
34
|
+
};
|
|
35
|
+
prComments: (repo: RepoRef, pr: number) => Effect.Effect<import("./review-model").RawReviewComment[], import("#gh/read/transport").GhError, GitHubService>;
|
|
36
|
+
prReviews: (repo: RepoRef, pr: number) => Effect.Effect<import("./review-model").RawPullRequestReview[], import("#gh/read/transport").GhError, GitHubService>;
|
|
37
|
+
reviewThreads: (repo: RepoRef, pr: number, consistency?: "cached" | "origin" | undefined) => Effect.Effect<import("./review-model").ThreadNode[], import("#gh/read/transport").GhError, GitHubService>;
|
|
38
|
+
lastHumanReviewer: (repo: RepoRef, pr: number) => Effect.Effect<import("./review-model").LastHumanReviewerQueryResult, import("#gh/read/transport").GhError, GitHubService>;
|
|
39
|
+
prView: (repo: RepoRef | null, selector: import("./pulls").PrSelector, consistency?: "cached" | "origin" | undefined) => Effect.Effect<{
|
|
40
|
+
readonly number: number;
|
|
41
|
+
readonly url: string;
|
|
42
|
+
readonly title: string;
|
|
43
|
+
readonly headRefName: string;
|
|
44
|
+
readonly baseRefName: string;
|
|
45
|
+
readonly state: string;
|
|
46
|
+
readonly isDraft: boolean;
|
|
47
|
+
readonly mergeable: "CONFLICTING" | "MERGEABLE" | "UNKNOWN";
|
|
48
|
+
readonly createdAt?: string | undefined;
|
|
49
|
+
readonly headRepositoryOwner?: {
|
|
50
|
+
readonly login: string;
|
|
51
|
+
} | undefined;
|
|
52
|
+
readonly headRefOid?: string | undefined;
|
|
53
|
+
readonly headSha?: string | null | undefined;
|
|
54
|
+
readonly baseSha?: string | null | undefined;
|
|
55
|
+
readonly body: string;
|
|
56
|
+
readonly author: {
|
|
57
|
+
readonly login: string;
|
|
58
|
+
readonly is_bot: boolean;
|
|
59
|
+
};
|
|
60
|
+
readonly reviewDecision: "" | "APPROVED" | "CHANGES_REQUESTED" | "REVIEW_REQUIRED";
|
|
61
|
+
readonly reviewRequests: ({
|
|
62
|
+
readonly __typename: "User";
|
|
63
|
+
readonly login: string;
|
|
64
|
+
} | {
|
|
65
|
+
readonly __typename: "Team";
|
|
66
|
+
readonly name: string;
|
|
67
|
+
readonly slug: string;
|
|
68
|
+
})[];
|
|
69
|
+
readonly mergeCommit?: {
|
|
70
|
+
readonly oid: string;
|
|
71
|
+
} | null | undefined;
|
|
72
|
+
}, import("#gh/read/transport").GhError, GitHubService>;
|
|
73
|
+
prList: (repo: RepoRef, filter: import("./pulls").PrListFilter, consistency?: "cached" | "origin" | undefined) => Effect.Effect<{
|
|
74
|
+
readonly number: number;
|
|
75
|
+
readonly url: string;
|
|
76
|
+
readonly title: string;
|
|
77
|
+
readonly headRefName: string;
|
|
78
|
+
readonly baseRefName: string;
|
|
79
|
+
readonly state: string;
|
|
80
|
+
readonly isDraft: boolean;
|
|
81
|
+
readonly mergeable: "CONFLICTING" | "MERGEABLE" | "UNKNOWN";
|
|
82
|
+
readonly author?: {
|
|
83
|
+
readonly login: string;
|
|
84
|
+
readonly is_bot?: boolean | undefined;
|
|
85
|
+
} | undefined;
|
|
86
|
+
readonly createdAt?: string | undefined;
|
|
87
|
+
readonly reviewDecision?: string | undefined;
|
|
88
|
+
readonly headRepositoryOwner?: {
|
|
89
|
+
readonly login: string;
|
|
90
|
+
} | undefined;
|
|
91
|
+
}[], import("#gh/read/transport").GhError, GitHubService>;
|
|
92
|
+
prChecks: (repo: RepoRef, pr: number | null, headSha: string | null) => Effect.Effect<import("#gh/types").CheckResult[], import("#gh/read/transport").GhError, GitHubService>;
|
|
93
|
+
prHead: (repo: RepoRef, pr: number, consistency?: "cached" | "origin" | undefined) => Effect.Effect<{
|
|
94
|
+
headSha: string;
|
|
95
|
+
baseSha: string;
|
|
96
|
+
signature: string;
|
|
97
|
+
}, import("#gh/read/transport").GhError, GitHubService>;
|
|
98
|
+
checkSignal: (repo: RepoRef, sha: string) => Effect.Effect<string, import("#gh/read/transport").GhError, GitHubService>;
|
|
99
|
+
runList: (repo: RepoRef, filter: RunFilter, consistency?: "cached" | "origin" | undefined) => Effect.Effect<readonly {
|
|
100
|
+
readonly databaseId: number;
|
|
101
|
+
readonly displayTitle: string;
|
|
102
|
+
readonly status: string;
|
|
103
|
+
readonly conclusion: string | null;
|
|
104
|
+
readonly headBranch: string;
|
|
105
|
+
readonly headSha: string;
|
|
106
|
+
readonly createdAt: string;
|
|
107
|
+
readonly event: string;
|
|
108
|
+
readonly url: string;
|
|
109
|
+
readonly workflowName: string;
|
|
110
|
+
}[], import("#gh/read/transport").GhError, GitHubService>;
|
|
111
|
+
runView: (repo: RepoRef, runId: number, consistency?: "cached" | "origin" | undefined) => Effect.Effect<{
|
|
112
|
+
readonly databaseId: number;
|
|
113
|
+
readonly displayTitle: string;
|
|
114
|
+
readonly status: string;
|
|
115
|
+
readonly conclusion: string | null;
|
|
116
|
+
readonly headBranch: string;
|
|
117
|
+
readonly headSha: string;
|
|
118
|
+
readonly createdAt: string;
|
|
119
|
+
readonly event: string;
|
|
120
|
+
readonly url: string;
|
|
121
|
+
readonly workflowName: string;
|
|
122
|
+
readonly jobs: readonly {
|
|
123
|
+
readonly databaseId: number;
|
|
124
|
+
readonly name: string;
|
|
125
|
+
readonly status: string;
|
|
126
|
+
readonly conclusion: string | null;
|
|
127
|
+
readonly startedAt: string;
|
|
128
|
+
readonly completedAt: string | null;
|
|
129
|
+
readonly url: string;
|
|
130
|
+
readonly steps: readonly {
|
|
131
|
+
readonly name: string;
|
|
132
|
+
readonly status: string;
|
|
133
|
+
readonly conclusion: string | null;
|
|
134
|
+
readonly number: number;
|
|
135
|
+
readonly startedAt?: string | null | undefined;
|
|
136
|
+
readonly completedAt?: string | null | undefined;
|
|
137
|
+
}[];
|
|
138
|
+
}[];
|
|
139
|
+
readonly attempt: number;
|
|
140
|
+
}, import("#gh/read/transport").GhError, GitHubService>;
|
|
141
|
+
runJobs: (repo: RepoRef, runId: number) => Effect.Effect<readonly {
|
|
142
|
+
readonly databaseId: number;
|
|
143
|
+
readonly name: string;
|
|
144
|
+
readonly status: string;
|
|
145
|
+
readonly conclusion: string | null;
|
|
146
|
+
readonly startedAt: string;
|
|
147
|
+
readonly completedAt: string | null;
|
|
148
|
+
readonly url: string;
|
|
149
|
+
readonly steps: readonly {
|
|
150
|
+
readonly name: string;
|
|
151
|
+
readonly status: string;
|
|
152
|
+
readonly conclusion: string | null;
|
|
153
|
+
readonly number: number;
|
|
154
|
+
readonly startedAt?: string | null | undefined;
|
|
155
|
+
readonly completedAt?: string | null | undefined;
|
|
156
|
+
}[];
|
|
157
|
+
}[], import("#gh/read/transport").GhError, GitHubService>;
|
|
158
|
+
runLog: (repo: RepoRef, runId: number, failedOnly: boolean, jobId: number | null) => Effect.Effect<string, import("#gh/read/transport").GhError, GitHubService>;
|
|
159
|
+
jobLog: (repo: RepoRef, job: JobRef) => Effect.Effect<string, import("#gh/read/transport").GhError, GitHubService>;
|
|
160
|
+
annotations: (repo: RepoRef, job: JobRef) => Effect.Effect<readonly {
|
|
161
|
+
readonly path: string;
|
|
162
|
+
readonly start_line: number;
|
|
163
|
+
readonly end_line: number;
|
|
164
|
+
readonly start_column: number | null;
|
|
165
|
+
readonly end_column: number | null;
|
|
166
|
+
readonly annotation_level: "failure" | "notice" | "warning";
|
|
167
|
+
readonly message: string;
|
|
168
|
+
readonly title: string | null;
|
|
169
|
+
readonly raw_details: string | null;
|
|
170
|
+
}[], import("#gh/read/transport").GhError, GitHubService>;
|
|
171
|
+
issueView: (repo: RepoRef, issue: number, consistency?: "cached" | "origin" | undefined) => Effect.Effect<{
|
|
172
|
+
readonly number: number;
|
|
173
|
+
readonly title: string;
|
|
174
|
+
readonly state: string;
|
|
175
|
+
readonly url: string;
|
|
176
|
+
readonly labels: {
|
|
177
|
+
readonly name: string;
|
|
178
|
+
}[];
|
|
179
|
+
readonly createdAt: string;
|
|
180
|
+
readonly assignees: {
|
|
181
|
+
readonly login: string;
|
|
182
|
+
}[];
|
|
183
|
+
readonly author: {
|
|
184
|
+
readonly login: string;
|
|
185
|
+
};
|
|
186
|
+
readonly body: string;
|
|
187
|
+
readonly closedAt: string | null;
|
|
188
|
+
}, import("#gh/read/transport").GhError, GitHubService>;
|
|
189
|
+
issueList: (repo: RepoRef, filter: import("./issues").IssueListFilter) => Effect.Effect<{
|
|
190
|
+
readonly number: number;
|
|
191
|
+
readonly title: string;
|
|
192
|
+
readonly state: string;
|
|
193
|
+
readonly url: string;
|
|
194
|
+
readonly labels: {
|
|
195
|
+
readonly name: string;
|
|
196
|
+
}[];
|
|
197
|
+
readonly createdAt: string;
|
|
198
|
+
}[], import("#gh/read/transport").GhError, GitHubService>;
|
|
199
|
+
issueComments: (repo: RepoRef, issue: number) => Effect.Effect<{
|
|
200
|
+
readonly id: number;
|
|
201
|
+
readonly user: {
|
|
202
|
+
readonly login: string;
|
|
203
|
+
};
|
|
204
|
+
readonly body: string;
|
|
205
|
+
readonly created_at: string;
|
|
206
|
+
readonly html_url: string;
|
|
207
|
+
}[], import("#gh/read/transport").GhError, GitHubService>;
|
|
208
|
+
};
|
|
209
|
+
//# sourceMappingURL=reads.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reads.d.ts","sourceRoot":"","sources":["../../../src/gh-tool/read/reads.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAU,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAShD,OAAO,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAUjD,MAAM,MAAM,MAAM,GAAG;IAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AA+CtE,eAAO,MAAM,WAAW,sGAatB,CAAC;AAgHH,eAAO,MAAM,SAAS,6HAWpB,CAAC;AA+EH,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsBjB,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { Effect, Schema } from "effect";
|
|
2
|
+
import { GitHubService } from "#gh/read/transport";
|
|
3
|
+
declare const Snapshot: Schema.Struct<{
|
|
4
|
+
readonly pages: Schema.$Array<Schema.Struct<{
|
|
5
|
+
readonly path: Schema.String;
|
|
6
|
+
readonly etag: Schema.NullOr<Schema.String>;
|
|
7
|
+
readonly body: Schema.Unknown;
|
|
8
|
+
}>>;
|
|
9
|
+
}>;
|
|
10
|
+
export type RestSnapshot = typeof Snapshot.Type;
|
|
11
|
+
export type RestSource = {
|
|
12
|
+
readonly path: string;
|
|
13
|
+
readonly kind: "single";
|
|
14
|
+
} | {
|
|
15
|
+
readonly path: string;
|
|
16
|
+
readonly kind: "pages";
|
|
17
|
+
readonly items: (body: unknown) => readonly unknown[];
|
|
18
|
+
};
|
|
19
|
+
export declare const restSnapshot: (key: ({
|
|
20
|
+
readonly repo: import("./keys").RepoRef;
|
|
21
|
+
} & {
|
|
22
|
+
readonly op: "prView" | "prHead" | "prComments" | "prReviews" | "reviewThreads" | "lastHumanReviewer";
|
|
23
|
+
readonly pr: number;
|
|
24
|
+
} & {
|
|
25
|
+
op: "prHead" | "checkSignal" | "issueComments" | "prComments" | "prReviews";
|
|
26
|
+
}) | ({
|
|
27
|
+
readonly repo: import("./keys").RepoRef;
|
|
28
|
+
} & {
|
|
29
|
+
readonly op: "checkSignal";
|
|
30
|
+
readonly sha: string;
|
|
31
|
+
} & {
|
|
32
|
+
op: "prHead" | "checkSignal" | "issueComments" | "prComments" | "prReviews";
|
|
33
|
+
}) | ({
|
|
34
|
+
readonly repo: import("./keys").RepoRef;
|
|
35
|
+
} & {
|
|
36
|
+
readonly op: "issueView" | "issueComments";
|
|
37
|
+
readonly issue: number;
|
|
38
|
+
} & {
|
|
39
|
+
op: "prHead" | "checkSignal" | "issueComments" | "prComments" | "prReviews";
|
|
40
|
+
}), sources: readonly RestSource[], consistency?: "cached" | "origin" | undefined) => Effect.Effect<{
|
|
41
|
+
readonly pages: readonly {
|
|
42
|
+
readonly path: string;
|
|
43
|
+
readonly etag: string | null;
|
|
44
|
+
readonly body: unknown;
|
|
45
|
+
}[];
|
|
46
|
+
}, import("#gh/read/transport").GhError, GitHubService>;
|
|
47
|
+
export declare const snapshotDigest: (snapshot: RestSnapshot) => string;
|
|
48
|
+
export {};
|
|
49
|
+
//# sourceMappingURL=rest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rest.d.ts","sourceRoot":"","sources":["../../../src/gh-tool/read/rest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAanD,QAAA,MAAM,QAAQ;;;;;;EAA+C,CAAC;AAC9D,MAAM,MAAM,YAAY,GAAG,OAAO,QAAQ,CAAC,IAAI,CAAC;AAChD,MAAM,MAAM,UAAU,GAClB;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAA;CAAE,GAClD;IACE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,SAAS,OAAO,EAAE,CAAC;CACvD,CAAC;AAEN,eAAO,MAAM,YAAY;;;;;;QACF,QAAQ,GAAG,aAAa,GAAG,eAAe,GAAG,YAAY,GAAG,WAAW;;;;;;;;;;;;;;;;;;;;;uDAkF5F,CAAC;AAEH,eAAO,MAAM,cAAc,aAAc,YAAY,KAAG,MACS,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Effect } from "effect";
|
|
2
|
+
import { GitHubService } from "#gh/read/transport";
|
|
3
|
+
import type { RepoRef } from "./keys";
|
|
4
|
+
import type { EditableComment, ReviewCommentById } from "./review-model";
|
|
5
|
+
export declare const reviewGuards: {
|
|
6
|
+
requestedReviewers: (repo: RepoRef, pr: number) => Effect.Effect<{
|
|
7
|
+
requested_reviewers?: unknown;
|
|
8
|
+
}, import("#gh/read/transport").GhError, GitHubService>;
|
|
9
|
+
commentById: (commentId: number) => Effect.Effect<ReviewCommentById, import("#gh/read/transport").GhError, GitHubService>;
|
|
10
|
+
editableComment: (repo: RepoRef, kind: "review" | "issue", commentId: number) => Effect.Effect<EditableComment, import("#gh/read/transport").GhError, GitHubService>;
|
|
11
|
+
viewer: () => Effect.Effect<{
|
|
12
|
+
login: string;
|
|
13
|
+
}, import("#gh/read/transport").GhError, GitHubService>;
|
|
14
|
+
pullNumber: (repo: RepoRef, pr: number) => Effect.Effect<{
|
|
15
|
+
number: number;
|
|
16
|
+
}, import("#gh/read/transport").GhError, GitHubService>;
|
|
17
|
+
pendingReviews: (repo: RepoRef, pr: number, after: string | null) => Effect.Effect<unknown, import("#gh/read/transport").GhError, GitHubService>;
|
|
18
|
+
pendingReviewContent: (reviewId: string, after: string | null) => Effect.Effect<unknown, import("#gh/read/transport").GhError, GitHubService>;
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=review-guards.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"review-guards.d.ts","sourceRoot":"","sources":["../../../src/gh-tool/read/review-guards.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAGtC,OAAO,KAAK,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEzE,eAAO,MAAM,YAAY;IACvB,kBAAkB,SAAS,OAAO,MAAM,MAAM;8BAGS,OAAO;;IAK9D,WAAW,cAAc,MAAM;IAQ/B,eAAe,SAAS,OAAO,QAAQ,QAAQ,GAAG,OAAO,aAAa,MAAM;IAQ5E,MAAM;eAGkC,MAAM;;IAE9C,UAAU,SAAS,OAAO,MAAM,MAAM;gBAGG,MAAM;;IAK/C,cAAc,SAAS,OAAO,MAAM,MAAM,SAAS,MAAM,GAAG,IAAI;IAUhE,oBAAoB,aAAa,MAAM,SAAS,MAAM,GAAG,IAAI;CAK9D,CAAC"}
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
export declare const REVIEW_THREADS_QUERY = "\n query($owner: String!, $name: String!, $pr: Int!, $after: String) {\n repository(owner: $owner, name: $name) {\n pullRequest(number: $pr) {\n reviewThreads(first: 100, after: $after) {\n nodes {\n id\n isResolved\n comments(first: 100) {\n nodes {\n id\n databaseId\n path\n line\n body\n author { login }\n commit { oid }\n }\n pageInfo { hasNextPage endCursor }\n }\n }\n pageInfo {\n hasNextPage\n endCursor\n }\n }\n }\n }\n }\n";
|
|
2
|
+
export declare const REVIEW_THREAD_COMMENTS_QUERY = "\n query($threadId: ID!, $after: String) {\n node(id: $threadId) {\n ... on PullRequestReviewThread {\n comments(first: 100, after: $after) {\n nodes {\n id\n databaseId\n path\n line\n body\n author { login }\n commit { oid }\n }\n pageInfo { hasNextPage endCursor }\n }\n }\n }\n }\n";
|
|
3
|
+
export declare const RESOLVE_THREAD_MUTATION = "\n mutation($threadId: ID!) {\n resolveReviewThread(input: {threadId: $threadId}) {\n thread { id isResolved }\n }\n }\n";
|
|
4
|
+
export declare const PENDING_REVIEWS_QUERY = "\n query($owner: String!, $name: String!, $pr: Int!, $after: String) {\n viewer { login }\n repository(owner: $owner, name: $name) {\n pullRequest(number: $pr) {\n reviews(first: 100, after: $after, states: [PENDING]) {\n nodes {\n id\n state\n author { login }\n }\n pageInfo { hasNextPage endCursor }\n }\n }\n }\n }\n";
|
|
5
|
+
export declare const PENDING_REVIEW_CONTENT_QUERY = "\n query($reviewId: ID!, $after: String) {\n viewer { login }\n node(id: $reviewId) {\n ... on PullRequestReview {\n id\n state\n body\n author { login }\n pullRequest {\n number\n repository { nameWithOwner }\n }\n comments(first: 100, after: $after) {\n nodes { body }\n pageInfo { hasNextPage endCursor }\n }\n }\n }\n }\n";
|
|
6
|
+
export declare const SUBMIT_REVIEW_MUTATION = "\n mutation($reviewId: ID!, $event: PullRequestReviewEvent!, $body: String) {\n submitPullRequestReview(input: { pullRequestReviewId: $reviewId, event: $event, body: $body }) {\n pullRequestReview { id state }\n }\n }\n";
|
|
7
|
+
export declare const LAST_HUMAN_REVIEWER_QUERY = "\n query($owner: String!, $name: String!, $pr: Int!) {\n repository(owner: $owner, name: $name) {\n pullRequest(number: $pr) {\n reviewRequests(first: 100) {\n nodes {\n requestedReviewer {\n __typename\n ... on User { login }\n ... on Team { name }\n ... on Bot { login }\n }\n }\n }\n reviews(last: 100) {\n nodes {\n author { login }\n state\n submittedAt\n }\n }\n }\n }\n }\n";
|
|
8
|
+
export type ThreadNode = {
|
|
9
|
+
id: string;
|
|
10
|
+
isResolved: boolean;
|
|
11
|
+
comments: {
|
|
12
|
+
nodes: Array<{
|
|
13
|
+
id: string;
|
|
14
|
+
databaseId: number;
|
|
15
|
+
path: string;
|
|
16
|
+
line: number;
|
|
17
|
+
body: string;
|
|
18
|
+
author: {
|
|
19
|
+
login: string;
|
|
20
|
+
};
|
|
21
|
+
commit: {
|
|
22
|
+
oid: string;
|
|
23
|
+
} | null;
|
|
24
|
+
}>;
|
|
25
|
+
pageInfo?: {
|
|
26
|
+
hasNextPage: boolean;
|
|
27
|
+
endCursor: string | null;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
export type ThreadCommentsQueryResult = {
|
|
32
|
+
node: {
|
|
33
|
+
comments: ThreadNode["comments"];
|
|
34
|
+
} | null;
|
|
35
|
+
};
|
|
36
|
+
export type ThreadsQueryResult = {
|
|
37
|
+
repository: {
|
|
38
|
+
pullRequest: {
|
|
39
|
+
reviewThreads: {
|
|
40
|
+
nodes: ThreadNode[];
|
|
41
|
+
pageInfo: {
|
|
42
|
+
hasNextPage: boolean;
|
|
43
|
+
endCursor: string | null;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
export type ResolveThreadResult = {
|
|
50
|
+
resolveReviewThread: {
|
|
51
|
+
thread: {
|
|
52
|
+
id: string;
|
|
53
|
+
isResolved: boolean;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
export type PendingReviewsQueryResult = {
|
|
58
|
+
viewer: {
|
|
59
|
+
login: string;
|
|
60
|
+
};
|
|
61
|
+
repository: {
|
|
62
|
+
pullRequest: {
|
|
63
|
+
reviews: {
|
|
64
|
+
nodes: Array<{
|
|
65
|
+
id: string;
|
|
66
|
+
state: string;
|
|
67
|
+
author: {
|
|
68
|
+
login: string;
|
|
69
|
+
};
|
|
70
|
+
}>;
|
|
71
|
+
pageInfo: {
|
|
72
|
+
hasNextPage: boolean;
|
|
73
|
+
endCursor: string | null;
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
export type PendingReviewContentQueryResult = {
|
|
80
|
+
viewer: {
|
|
81
|
+
login: string;
|
|
82
|
+
};
|
|
83
|
+
node: {
|
|
84
|
+
id: string;
|
|
85
|
+
state: string;
|
|
86
|
+
body: string | null;
|
|
87
|
+
author: {
|
|
88
|
+
login: string;
|
|
89
|
+
};
|
|
90
|
+
pullRequest: {
|
|
91
|
+
number: number;
|
|
92
|
+
repository: {
|
|
93
|
+
nameWithOwner: string;
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
comments: {
|
|
97
|
+
nodes: Array<{
|
|
98
|
+
body: string;
|
|
99
|
+
}>;
|
|
100
|
+
pageInfo: {
|
|
101
|
+
hasNextPage: boolean;
|
|
102
|
+
endCursor: string | null;
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
} | null;
|
|
106
|
+
};
|
|
107
|
+
export type SubmitReviewResult = {
|
|
108
|
+
submitPullRequestReview: {
|
|
109
|
+
pullRequestReview: {
|
|
110
|
+
id: string;
|
|
111
|
+
state: string;
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
export type RequestedReviewerNode = {
|
|
116
|
+
__typename: string;
|
|
117
|
+
login?: string;
|
|
118
|
+
name?: string;
|
|
119
|
+
} | null;
|
|
120
|
+
export type LastHumanReviewerQueryResult = {
|
|
121
|
+
repository: {
|
|
122
|
+
pullRequest: {
|
|
123
|
+
reviewRequests: {
|
|
124
|
+
nodes: Array<{
|
|
125
|
+
requestedReviewer: RequestedReviewerNode;
|
|
126
|
+
}>;
|
|
127
|
+
};
|
|
128
|
+
reviews: {
|
|
129
|
+
nodes: Array<{
|
|
130
|
+
author: {
|
|
131
|
+
login: string;
|
|
132
|
+
} | null;
|
|
133
|
+
state: string;
|
|
134
|
+
submittedAt: string | null;
|
|
135
|
+
}>;
|
|
136
|
+
};
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
export type RawReviewComment = {
|
|
141
|
+
id: number;
|
|
142
|
+
in_reply_to_id: number | null;
|
|
143
|
+
user: {
|
|
144
|
+
login: string;
|
|
145
|
+
};
|
|
146
|
+
body: string;
|
|
147
|
+
path: string;
|
|
148
|
+
line: number;
|
|
149
|
+
created_at: string;
|
|
150
|
+
updated_at: string;
|
|
151
|
+
pull_request_review_id?: number | null;
|
|
152
|
+
commit_id?: string | null;
|
|
153
|
+
};
|
|
154
|
+
export type RawIssueComment = {
|
|
155
|
+
id: number;
|
|
156
|
+
user: {
|
|
157
|
+
login: string;
|
|
158
|
+
};
|
|
159
|
+
body: string;
|
|
160
|
+
created_at: string;
|
|
161
|
+
html_url: string;
|
|
162
|
+
};
|
|
163
|
+
export type RawPullRequestReview = {
|
|
164
|
+
id: number;
|
|
165
|
+
user: {
|
|
166
|
+
login: string;
|
|
167
|
+
} | null;
|
|
168
|
+
state: string;
|
|
169
|
+
body: string | null;
|
|
170
|
+
submitted_at: string | null;
|
|
171
|
+
html_url: string;
|
|
172
|
+
commit_id?: string | null;
|
|
173
|
+
};
|
|
174
|
+
export type ReviewCommentById = {
|
|
175
|
+
id: number;
|
|
176
|
+
in_reply_to_id: number | null;
|
|
177
|
+
pull_request_url: string;
|
|
178
|
+
};
|
|
179
|
+
export type EditableComment = {
|
|
180
|
+
id: number;
|
|
181
|
+
user: {
|
|
182
|
+
login: string;
|
|
183
|
+
};
|
|
184
|
+
html_url: string;
|
|
185
|
+
updated_at: string;
|
|
186
|
+
pull_request_url?: string;
|
|
187
|
+
issue_url?: string;
|
|
188
|
+
};
|
|
189
|
+
export declare const REST_PAGE_SIZE = 100;
|
|
190
|
+
//# sourceMappingURL=review-model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"review-model.d.ts","sourceRoot":"","sources":["../../../src/gh-tool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|
+
import type { ThreadNode, LastHumanReviewerQueryResult, RawReviewComment, RawPullRequestReview } from "./review-model";
|
|
5
|
+
export declare const prComments: (repo: RepoRef, pr: number) => Effect.Effect<RawReviewComment[], import("#gh/read/transport").GhError, GitHubService>;
|
|
6
|
+
export declare const prReviews: (repo: RepoRef, pr: number) => Effect.Effect<RawPullRequestReview[], import("#gh/read/transport").GhError, GitHubService>;
|
|
7
|
+
export declare const reviewThreads: (repo: RepoRef, pr: number, consistency?: "cached" | "origin" | undefined) => Effect.Effect<ThreadNode[], import("#gh/read/transport").GhError, GitHubService>;
|
|
8
|
+
export declare const lastHumanReviewer: (repo: RepoRef, pr: number) => Effect.Effect<LastHumanReviewerQueryResult, import("#gh/read/transport").GhError, GitHubService>;
|
|
9
|
+
//# sourceMappingURL=reviews.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reviews.d.ts","sourceRoot":"","sources":["../../../src/gh-tool/read/reviews.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAU,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAMnD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAMtC,OAAO,KAAK,EACV,UAAU,EAGV,4BAA4B,EAC5B,gBAAgB,EAChB,oBAAoB,EACrB,MAAM,gBAAgB,CAAC;AAoDxB,eAAO,MAAM,UAAU,uHAGrB,CAAC;AACH,eAAO,MAAM,SAAS,2HAGpB,CAAC;AACH,eAAO,MAAM,aAAa,gKAaxB,CAAC;AACH,eAAO,MAAM,iBAAiB,iIAmB5B,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Effect } from "effect";
|
|
2
|
+
import { GitHubService } from "#gh/read/transport";
|
|
3
|
+
import type { StackView } from "#gh/types";
|
|
4
|
+
export declare const readStack: (opts: {
|
|
5
|
+
pr: number;
|
|
6
|
+
}) => Effect.Effect<StackView, import("#gh/read/transport").GhError, GitHubService>;
|
|
7
|
+
//# sourceMappingURL=stacks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stacks.d.ts","sourceRoot":"","sources":["../../../src/gh-tool/read/stacks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,OAAO,KAAK,EAAe,SAAS,EAAE,MAAM,WAAW,CAAC;AAoBxD,eAAO,MAAM,SAAS;QAAoD,MAAM;mFAgD9E,CAAC"}
|