import { type Gh } from './app.js'; export declare const RULESET_NAME = "BlazeResolver: protect the default branch"; export declare const codeownersBlock: (owner: string) => string; /** The branch ruleset: no deleting, no force pushes, and every change through a PR that a human approved. */ export declare function rulesetBody(strict: boolean): { name: string; target: string; enforcement: string; conditions: { ref_name: { include: string[]; exclude: never[]; }; }; rules: ({ type: string; parameters?: undefined; } | { type: string; parameters: { required_approving_review_count: number; dismiss_stale_reviews_on_push: boolean; require_code_owner_review: boolean; require_last_push_approval: boolean; required_review_thread_resolution: boolean; }; })[]; bypass_actors: { actor_id: number; actor_type: string; bypass_mode: string; }[]; }; export interface Step { name: string; status: 'done' | 'skipped' | 'failed' | 'planned'; detail: string; } export interface HardenOptions { root: string; repo: string; /** Who reviews the sensitive paths, e.g. @you or @org/team. Defaults to the logged-in gh user. */ owner?: string; /** No admin bypass: not even you can merge without an approval from someone else. */ strict?: boolean; /** Show what would change and change nothing. */ dryRun?: boolean; log?: (line: string) => void; run?: Gh; /** Asked before anything is changed on GitHub. Omit to go ahead. */ confirm?: (question: string) => Promise; } /** * Applies the repo settings that make "a human always approves" true on GitHub's side, not just in BlazeResolver's: * a branch ruleset, CODEOWNERS for the sensitive paths, read-only Actions by default, and secret-scanning push * protection. Each step reports on its own, because free private repos cannot use rulesets and that must not block the rest. */ export declare function runHarden(opts: HardenOptions): Promise; //# sourceMappingURL=harden.d.ts.map