import type { GithubMetadata } from "./schema.js"; export interface GithubRepoRef { owner: string; repo: string; } export declare function parseGithubRepoUrl(url: string | undefined): GithubRepoRef | undefined; /** * Resolve a GitHub token from the environment. `GH_TOKEN` is checked * first because that is the name the GitHub CLI and the scaffolded * workflows use; `GITHUB_TOKEN` is the Actions-provided name. Reading * only one of the two meant `sync-github.yml` — which passes * `GH_TOKEN` — silently ran unauthenticated. */ export declare function resolveGithubToken(): string | undefined; export declare function fetchGithubMetadata(ref: GithubRepoRef, token?: string | undefined): Promise; /** * Build the patch that `sync github` writes to `record.github`. * * Merges fetched metadata into the existing `record.github.repository` * block rather than replacing it — sync only owns the fields it * explicitly writes. Every other field (curator-written `description`, * once-fetched `id`/`node_id`, manually-added metadata, etc.) survives. * * `latestReleaseAt` and `homepage` live at the top level of `github` * (the schema's `githubMetadataSchema` shape), not nested inside * `repository`. */ export declare function buildGithubSyncPatch(metadata: GithubMetadata, existingGithub: Record | undefined): Record; //# sourceMappingURL=github.d.ts.map