@devries-cameron20 / t3code Mirror · read-only
Fork 0

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

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 04:45 UTC

main
ts 27 lines 929 Bytes
Raw
1 import * as Pulls from "@distilled.cloud/github/pulls";
2 import * as Layer from "effect/Layer";
3 import * as BindingHttp from "./BindingHttp.ts";
4 import {
5 ListPullRequestReviews,
6 type ListPullRequestReviewsRequest,
7 } from "./ListPullRequestReviews.ts";
8
9 export const listPullRequestReviewsOperation = BindingHttp.operation(
10 "pulls.listReviews",
11 (repo) => (request: ListPullRequestReviewsRequest) =>
12 Pulls.listReviews({ owner: repo.owner, repo: repo.repository, ...request }),
13 );
14
15 /**
16 * Token-backed implementation of {@link ListPullRequestReviews}. Provide it on a Worker or
17 * Function: it captures a `GitHub.PersonalAccessToken` for the host and binds
18 * the token and the repository into it.
19 *
20 * @layer
21 * @product Pull Request
22 * @provides GitHub.ListPullRequestReviews
23 */
24 export const ListPullRequestReviewsHttp = Layer.effect(
25 ListPullRequestReviews,
26 BindingHttp.make(listPullRequestReviewsOperation),
27 );