/** * design #9 — map GitHub PR reviews to the Approval shape `isGateSatisfied` * grades. Pure + unit-tested; the live `gh api` fetch lives in ./index.ts. * * The identity classification is the load-bearing bit: a review authored by a * Bot account (GitHub `user.type === "Bot"`, or a login ending in `[bot]`, or a * known slowcook bot handle) is marked `identityType: "bot"` so it can never * satisfy a human-review gate — the automation cannot self-approve. */ import type { Approval } from "./model.js"; /** Subset of the GitHub PR-review payload we consume. */ export interface GhReview { user?: { login?: string; type?: string; } | null; state?: string; } /** Logins always treated as bots regardless of the GitHub `type` field. */ export declare const BOT_LOGINS: ReadonlyArray; /** * Convert raw PR reviews into Approvals. Dismissed/pending reviews are dropped. * Only the latest review per author is kept (GitHub returns reviews * chronologically; a later review supersedes an earlier one from the same user). */ export declare function mapReviewsToApprovals(reviews: GhReview[]): Approval[]; //# sourceMappingURL=github.d.ts.map