The best way to control Claude Code, Codex and more from any computer or phone

main
ts 50 lines 1.6 KB
Raw
1 import type * as Pulls from "@distilled.cloud/github/pulls";
2 import * as Binding from "alchemy/Binding";
3 import type { RuntimeContext } from "alchemy/RuntimeContext";
4 import type * as Effect from "effect/Effect";
5 import type { Repository } from "./Repository.ts";
6
7 export interface ListPullRequestReviewCommentsRequest extends Omit<
8 Pulls.ListReviewCommentsRequest,
9 "owner" | "repo"
10 > {}
11
12 export type ListPullRequestReviewCommentsResponse = Pulls.ListReviewCommentsResponse;
13
14 /**
15 * List one page of a pull request's inline review comments
16 * (`pulls.listReviewComments`), each anchored to a `path` and `line` of the
17 * diff.
18 *
19 * Provide `GitHub.ListPullRequestReviewCommentsHttp` on a Worker or Function, or
20 * `GitHub.ListPullRequestReviewCommentsLocal` on an Action.
21 *
22 * ### Listing Review Comments at Runtime
23 * **Example:** Read the inline comments
24 * ```typescript
25 * const listReviewComments = yield* GitHub.ListPullRequestReviewComments(yield* Repo);
26 * const comments = yield* listReviewComments({ pull_number: 9, per_page: 100 });
27 * ```
28 *
29 * @binding
30 * @product Pull Request
31 */
32 export interface ListPullRequestReviewComments extends Binding.Service<
33 ListPullRequestReviewComments,
34 "GitHub.ListPullRequestReviewComments",
35 (
36 repo: Repository,
37 ) => Effect.Effect<
38 (
39 request: ListPullRequestReviewCommentsRequest,
40 ) => Effect.Effect<
41 ListPullRequestReviewCommentsResponse,
42 Pulls.ListReviewCommentsError,
43 RuntimeContext
44 >
45 >
46 > {}
47
48 export const ListPullRequestReviewComments = Binding.Service<ListPullRequestReviewComments>(
49 "GitHub.ListPullRequestReviewComments",
50 );