@issue-linker/core
Version:
Core library for issue-linker functionality
49 lines • 2.08 kB
TypeScript
import type { GitHubIssueResult, PullRequestCommit } from "../domain/validation-schemas.js";
/**
* Get an issue from GitHub
* @param owner - Repository owner
* @param repo - Repository name
* @param issueNumber - Issue number
* @param token - Optional GitHub token
* @param hostname - Optional GitHub hostname for Enterprise
* @returns Result object containing issue or error information
*/
export declare function getIssue(owner: string, repo: string, issueNumber: number, token?: string, hostname?: string): Promise<GitHubIssueResult>;
/**
* Fetch commits from a pull request
* @param owner - Repository owner
* @param repo - Repository name
* @param prNumber - Pull request number
* @param token - Optional GitHub token
* @param hostname - Optional GitHub hostname for Enterprise
* @returns Array of pull request commits
* @throws GitHubError for API errors
*/
export declare function fetchPullRequestCommits(owner: string, repo: string, prNumber: number, token?: string, hostname?: string): Promise<PullRequestCommit[]>;
/**
* Create a comment on an issue (internal use only)
* @param owner - Repository owner
* @param repo - Repository name
* @param issueNumber - Issue number
* @param body - Comment body
* @param token - Optional GitHub token
* @param hostname - Optional GitHub hostname for Enterprise
* @returns Comment ID on success
* @internal
*/
export declare function createIssueComment(owner: string, repo: string, issueNumber: number, body: string, token?: string, hostname?: string): Promise<number>;
/**
* List comments on an issue (internal use only)
* @param owner - Repository owner
* @param repo - Repository name
* @param issueNumber - Issue number
* @param token - Optional GitHub token
* @param hostname - Optional GitHub hostname for Enterprise
* @returns Array of comment bodies
* @internal
*/
export declare function listIssueComments(owner: string, repo: string, issueNumber: number, token?: string, hostname?: string): Promise<Array<{
id: number;
body: string;
}>>;
//# sourceMappingURL=github-client.d.ts.map