import { type ProviderClient } from './provider-client.js'; import { type CreatedResult } from './receipt.js'; import { type RelayClientOptions } from './transport.js'; export interface GithubTarget { owner: string; repo: string; number: number; } export interface GithubClient extends ProviderClient<'github'> { /** Comment on an issue or pull request. */ comment(target: GithubTarget, body: string): Promise; /** Create an issue. */ createIssue(args: { owner: string; repo: string; title: string; body: string; labels?: string[]; }): Promise; /** Create a pull request from a branch already present on GitHub. */ createPullRequest(args: { owner: string; repo: string; title: string; head: string; base: string; body?: string; draft?: boolean; author?: 'app' | 'user'; }): Promise; /** Create a Git ref through a non-canonical draft. */ pushRef(args: { owner: string; repo: string; ref: string; sha: string; }): Promise; /** Update a Git ref through its deterministic canonical resource path. */ updateRef(args: { owner: string; repo: string; ref: string; sha: string; force?: boolean; }): Promise; /** Close a pull request without merging it. */ closePullRequest(target: GithubTarget): Promise; /** * Merge a pull request. (Named `mergePullRequest`, not `merge`, because * `merge` is the catalog resource key exposed as `.merge`.) */ mergePullRequest(args: { owner: string; repo: string; number: number; method?: 'merge' | 'squash' | 'rebase'; commitTitle?: string; commitMessage?: string; sha?: string; }): Promise<{ merged: boolean; sha?: string; }>; /** Post a review on a pull request. */ review(target: GithubTarget, args: { body: string; event: 'COMMENT' | 'APPROVE' | 'REQUEST_CHANGES'; comments?: Array<{ path: string; line: number; body: string; }>; }): Promise; } /** * Ergonomic GitHub client over the writeback-path catalog, plus the uniform * resource-keyed access (`.issues`, `.["issue-comments"]`, `.merge`, `.reviews`). */ export declare function githubClient(opts?: RelayClientOptions): GithubClient; //# sourceMappingURL=github.d.ts.map