/** * @file Resolve a GitHub git ref via GraphQL. Split out of `github/refs.ts` for * size hygiene. The fallback the REST tier-cascade calls when it detects the * documented "200 + empty body" incident shape — GraphQL hits a different * backend at GitHub (not the same Elasticsearch index as REST listings) and * stays consistent through those incidents. */ import type { GitHubFetchOptions } from './types.js'; export type GraphqlRefResponse = { data?: { repository?: { tagRef?: { target?: { __typename: 'Tag'; target?: { oid: string; } | undefined; } | { __typename: 'Commit'; oid: string; } | null | undefined; } | null | undefined; branchRef?: { target?: { oid: string; } | null | undefined; } | null | undefined; commit?: { __typename?: string | undefined; oid?: string | undefined; } | null | undefined; } | null | undefined; } | undefined; errors?: Array<{ message: string; }> | undefined; }; /** * Resolve a ref through GraphQL, preferring tags, then branches, then commits. */ export declare function fetchRefShaViaGraphQL(owner: string, repo: string, ref: string, options: GitHubFetchOptions): Promise; export declare function resolveGraphqlRefOid(repoData: NonNullable['repository']>): string | undefined;