import type { PrViewResult, PrListResult, PrCreateResult, PrMergeResult, PrDiffResult, CommentResult, PrReviewResult, EditResult, PrChecksResult, PrCloseResult, PrReopenResult, PrReadyResult, IssueViewResult, IssueListResult, IssueCreateResult, IssueCloseResult, RunViewResult, RunListResult, RunRerunResult, ReleaseCreateResult, GistCreateResult, ReleaseListResult, ApiResult, LabelListResult, LabelCreateResult, RepoViewResult, RepoCloneResult, DiscussionListResult } from "../schemas/index.js"; /** * Parses `gh pr view --json ...` output into structured PR view data. * Renames gh field names to our schema names (e.g., headRefName → headBranch). */ export declare function parsePrView(json: string): PrViewResult; /** * Parses `gh pr list --json ...` output into structured PR list data. */ export declare function parsePrList(json: string): PrListResult; /** * Parses `gh pr create` output (URL on stdout) into structured data. * The gh CLI prints the new PR URL to stdout. We extract the number from it. */ export declare function parsePrCreate(stdout: string, opts?: { draft?: boolean; }): PrCreateResult; /** * Parses `gh pr edit` output into structured data. * The gh CLI prints the PR URL to stdout on success. */ export declare function parsePrUpdate(stdout: string, number: number, updatedFields?: string[], operations?: string[]): EditResult; /** * Parses `gh pr merge` output into structured data. * The gh CLI prints a confirmation message with the PR URL on success. * Enhanced to detect merge commit SHA, auto-merge state, and merge method. */ export declare function parsePrMerge(stdout: string, number: number, method: string, deleteBranch?: boolean, auto?: boolean, disableAuto?: boolean): PrMergeResult; /** * Parses `gh pr comment` / `gh issue comment` output into structured data. * The gh CLI prints the new comment URL to stdout. * S-gap: Enhanced to include operation type, commentId, number, and body echo. */ export declare function parseComment(stdout: string, opts?: { operation?: "create" | "edit" | "delete"; issueNumber?: number; prNumber?: number; }): CommentResult; /** * Parses `gh pr review` output into structured data. * The gh CLI prints a confirmation message with the PR URL on success. * S-gap: Enhanced to include reviewId, reviewDecision, and body echo. */ export declare function parsePrReview(stdout: string, number: number, event: string, body?: string, stderr?: string): PrReviewResult; /** * Parses `gh pr checks --json ...` output into structured PR checks data. * Computes summary counts by bucket (pass, fail, pending, skipping, cancel). * Deduplicates entries by check name, keeping the most recent run * (determined by completedAt, then startedAt, with later entries winning ties). */ export declare function parsePrChecks(json: string, pr: number): PrChecksResult; /** * Parses `gh issue view --json ...` output into structured issue view data. */ export declare function parseIssueView(json: string): IssueViewResult; /** * Parses `gh issue list --json ...` output into structured issue list data. */ export declare function parseIssueList(json: string): IssueListResult; /** * Parses `gh issue create` output (URL on stdout) into structured data. * The gh CLI prints the new issue URL to stdout. We extract the number from it. * S-gap: Enhanced to echo back applied labels. */ export declare function parseIssueCreate(stdout: string): IssueCreateResult; /** * Parses `gh issue close` output into structured data. * The gh CLI may print a confirmation message plus URL to stdout. * We robustly extract the issue URL using a regex rather than assuming * the entire stdout is just a URL (handles extra text, whitespace, and * different output formats). * S-gap: Enhanced to include reason and commentUrl. */ export declare function parseIssueClose(stdout: string, number: number, reason?: string, comment?: string, stderr?: string): IssueCloseResult; /** * Parses `gh pr close` output into structured data. * The gh CLI may print a confirmation message plus the PR URL to stdout, and * may also include a "branch deleted" notice when --delete-branch was passed. * If `number` is `0` and the URL contains a PR number, that number is used instead. */ export declare function parsePrClose(stdout: string, number: number, deleteBranch?: boolean, stderr?: string): PrCloseResult; /** * Parses `gh pr reopen` output into structured data. */ export declare function parsePrReopen(stdout: string, number: number, stderr?: string): PrReopenResult; /** * Parses `gh pr ready` output into structured data. * When `undo=true`, the PR is converted back to draft. */ export declare function parsePrReady(stdout: string, number: number, undo?: boolean): PrReadyResult; /** * Parses `gh issue edit` output into structured data. * The gh CLI prints the issue URL to stdout on success. */ export declare function parseIssueUpdate(stdout: string, number: number, updatedFields?: string[], operations?: string[]): EditResult; /** * Parses `gh run view --json ...` output into structured run view data. * Renames gh field names (e.g., databaseId → id). * S-gap: Enhanced to include job steps, headSha, event, startedAt, attempt. */ export declare function parseRunView(json: string): RunViewResult; /** * Parses `gh run list --json ...` output into structured run list data. */ export declare function parseRunList(json: string): RunListResult; /** * Parses `gh run rerun` output into structured data. * The gh CLI prints a confirmation message to stderr on success. * We construct the URL from the run ID and repo info. * S-gap: Enhanced to include job field. */ export declare function parseRunRerun(stdout: string, stderr: string, runId: number, failedOnly: boolean, job?: string): RunRerunResult; /** * Parses `gh release create` output (URL on stdout) into structured data. * The gh CLI prints the new release URL to stdout. * S-gap: Enhanced to include title, assetsUploaded count. */ export declare function parseReleaseCreate(stdout: string, tag: string, draft: boolean, prerelease: boolean, title?: string): ReleaseCreateResult; /** * Parses `gh release list --json ...` output into structured release list data. * * Note: `gh release list --json` does not expose a `url` field — only * `gh release view --json` does. We intentionally omit it from the output to * avoid `Unknown JSON field: "url"` errors from gh. See issue #868. */ export declare function parseReleaseList(json: string): ReleaseListResult; /** * Parses `gh api` stdout into structured API result data. * When `--include` is used, the output starts with HTTP headers followed by * a blank line and then the response body. We parse the real HTTP status code * from the status line and separate the body. */ export declare function parseApi(stdout: string, exitCode: number, endpoint: string, method: string, stderr?: string): ApiResult; /** * Parses `gh gist create` output (URL on stdout) into structured data. * The gh CLI prints the new gist URL to stdout. We extract the ID from it. * S-gap: Enhanced to include files, description, fileCount. */ export declare function parseGistCreate(stdout: string, isPublic: boolean, files?: string[], description?: string): GistCreateResult; /** * Parses `gh label list --json ...` output into structured label list data. * Handles empty stdout gracefully: `gh label list --search ` exits 0 but * prints nothing (not `[]`) when no labels match. Treat that as an empty list * rather than letting `JSON.parse("")` throw "Unexpected end of JSON input". */ export declare function parseLabelList(json: string): LabelListResult; /** * Parses `gh label create` output into structured label create data. * The gh CLI prints a confirmation message to stderr on success. */ export declare function parseLabelCreate(stdout: string, stderr: string, name: string, description?: string, color?: string): LabelCreateResult; /** * Parses `gh repo view --json ...` output into structured repo view data. * Renames gh field names to our schema names (e.g., stargazerCount -> stars). */ export declare function parseRepoView(json: string): RepoViewResult; /** * Parses `gh repo clone` output into structured repo clone data. * The gh CLI prints a confirmation message to stderr on success. */ export declare function parseRepoClone(stdout: string, stderr: string, repo: string, directory?: string): RepoCloneResult; /** * Parses `gh api graphql` output for discussions into structured discussion list data. * The GraphQL response contains a repository.discussions object with nodes and totalCount. */ export declare function parseDiscussionList(json: string): DiscussionListResult; /** * Parses `gh pr diff --numstat` output into structured PR diff data. * The numstat format is: additions\tdeletions\tfilename per line. */ export declare function parsePrDiffNumstat(stdout: string): PrDiffResult; //# sourceMappingURL=parsers.d.ts.map