/** * @fileoverview GitHub connector for interacting with GitHub via the gh CLI. * * SECURITY: This connector NEVER logs stdout to prevent token exposure. */ /** Options for creating an issue */ export interface IssueCreateOptions { /** Issue title */ title: string; /** Issue body/description */ body: string; /** Repository in owner/repo format (uses current repo if not specified) */ repo?: string; /** Labels to apply to the issue */ labels?: string[]; /** Project to add the issue to */ project?: string; } /** Filters for listing issues */ export interface IssueFilters { /** Filter by state */ state?: 'open' | 'closed' | 'all'; /** Filter by label */ label?: string; /** Filter by assignee */ assignee?: string; /** Maximum number of issues to return */ limit?: number; } /** Represents a GitHub issue */ export interface Issue { /** Issue number */ number: number; /** Issue title */ title: string; /** Issue state */ state: 'open' | 'closed'; /** URL to the issue */ url: string; } /** Options for creating a pull request */ export interface PrCreateOptions { /** PR title */ title: string; /** PR body/description */ body: string; /** Source branch */ head: string; /** Target branch (defaults to default branch) */ base?: string; /** Create as draft PR */ draft?: boolean; } /** Represents a GitHub pull request */ export interface PullRequest { /** PR number */ number: number; /** PR title */ title: string; /** PR state */ state: 'open' | 'closed' | 'merged'; /** URL to the PR */ url: string; } /** Options for GitHubConnector */ export interface GitHubConnectorOptions { /** Enable debug logging of commands (never logs stdout for security) */ debug?: boolean; } /** * Connector for interacting with GitHub via the gh CLI. * * SECURITY: This connector NEVER logs stdout to prevent accidental * exposure of tokens or sensitive data from gh CLI output. * * @example * ```typescript * const gh = new GitHubConnector({ debug: true }); * * // Create an issue * const issueNum = await gh.issueCreate({ * title: 'Bug report', * body: 'Description of the bug', * labels: ['bug'] * }); * * // List issues * const issues = await gh.issueList('owner/repo', { state: 'open', limit: 10 }); * ``` */ export declare class GitHubConnector { private options?; constructor(options?: GitHubConnectorOptions); /** * Create a new issue. * * @param opts - Issue creation options * @returns Issue number on success, or throws on failure */ issueCreate(opts: IssueCreateOptions): Promise; /** * List issues from a repository. * * @param repo - Repository in owner/repo format * @param filters - Optional filters * @returns Array of issues */ issueList(repo: string, filters?: IssueFilters): Promise; /** * Create a new pull request. * * @param opts - PR creation options * @returns PR number on success, or throws on failure */ prCreate(opts: PrCreateOptions): Promise; /** * List pull requests from a repository. * * @param repo - Repository in owner/repo format * @param filters - Optional filters (reuses IssueFilters for similar fields) * @returns Array of pull requests */ prList(repo: string, filters?: IssueFilters): Promise; /** * Execute a gh command. * * SECURITY: This method enables debug logging for commands but * NEVER logs stdout to prevent token exposure. */ private execGh; } //# sourceMappingURL=github.d.ts.map