/** * Resolves a commit-subject `(#N)` reference that does not resolve as a pull request * (`gh pr view N` fails) to the unique merged pull request that closed issue #N. * * Uses GitHub's own closing-reference evidence — the same linkage GitHub computes to * show "closed via #N" on an issue and to populate an issue's linked-PR sidebar — via * `Issue.timelineItems(itemTypes: [CLOSED_EVENT]).closer`. This is authoritative * (GitHub-computed from merge/keyword linkage), unlike free-text search over PR * bodies, which depends on exact wording and can both over- and under-match. * * Never guesses: zero or more-than-one candidate merged-PR closer is a resolution * failure. Callers turn that into a named preflight finding rather than trusting a * fabricated mapping (see release-preflight.ts's evidence-binding contract, #382). * * Read-only: a single `gh api graphql` read through the shared {@link Runner} seam * (see CONTRIBUTING.md's "the one hard rule" — no production code mutates remote * state). */ import { type Runner } from "./proc.js"; import type { MergedPr } from "./release-preflight.js"; export declare const ISSUE_REF_RESOLUTION_EVIDENCE = "gh api graphql: repository.issue.timelineItems(CLOSED_EVENT).closer"; /** * Resolves issue #{@link issueNumber} to the unique merged pull request that closed * it, returning the same shape `release-preflight.ts` fetches for a direct PR ref. * Rejects (never returns a guess) when there is no closer, the closer never merged, * the closer is a bare commit rather than a PR, or more than one distinct merged PR * closed the issue (e.g. reopened and closed again by a different PR). */ export declare function resolveIssueRefToMergedPr(issueNumber: number, run?: Runner): Promise;