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
| 1 | import type * as Issues from "@distilled.cloud/github/issues"; |
| 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 ListIssueCommentsRequest extends Omit< |
| 8 | Issues.ListCommentsRequest, |
| 9 | "owner" | "repo" |
| 10 | > {} |
| 11 | |
| 12 | export type ListIssueCommentsResponse = Issues.ListCommentsResponse; |
| 13 | |
| 14 | /** |
| 15 | * List one page of the comments on an issue or pull request |
| 16 | * (`issues.listComments`), oldest first. Pass a pull request's number as |
| 17 | * `issue_number`. |
| 18 | * |
| 19 | * Provide `GitHub.ListIssueCommentsHttp` on a Worker or Function, or |
| 20 | * `GitHub.ListIssueCommentsLocal` on an Action. |
| 21 | * |
| 22 | * ### Listing Comments at Runtime |
| 23 | * **Example:** Read an issue's thread |
| 24 | * ```typescript |
| 25 | * const listComments = yield* GitHub.ListIssueComments(yield* Repo); |
| 26 | * const comments = yield* listComments({ issue_number: 7, per_page: 100 }); |
| 27 | * ``` |
| 28 | * |
| 29 | * @binding |
| 30 | * @product Issue |
| 31 | */ |
| 32 | export interface ListIssueComments extends Binding.Service< |
| 33 | ListIssueComments, |
| 34 | "GitHub.ListIssueComments", |
| 35 | ( |
| 36 | repo: Repository, |
| 37 | ) => Effect.Effect< |
| 38 | ( |
| 39 | request: ListIssueCommentsRequest, |
| 40 | ) => Effect.Effect<ListIssueCommentsResponse, Issues.ListCommentsError, RuntimeContext> |
| 41 | > |
| 42 | > {} |
| 43 | |
| 44 | export const ListIssueComments = Binding.Service<ListIssueComments>("GitHub.ListIssueComments"); |