/** * Auto-PR — turn a detected design system change into a pull request. * * Flow on detected change: * 1. Run `git checkout -b memoire/sync-` in the project * 2. Stage all generated file changes * 3. Commit with a diff summary * 4. Push the branch * 5. Open a PR via `gh pr create` (falls back to printing the URL) * * Requires: `git` CLI + `gh` CLI authenticated. Silently skips if `gh` is * unavailable — in that case, the branch is still pushed and the URL is * printed for manual PR creation. */ import type { DiffPayload } from "../commands/diff.js"; export interface AutoPrResult { status: "opened" | "pushed-no-gh" | "skipped-no-changes" | "failed"; branch?: string; prUrl?: string; commitSha?: string; error?: string; } export interface AutoPrOptions { cwd: string; diff: DiffPayload; /** Base branch to target (default: main) */ base?: string; /** Dry-run: print what would happen without executing git */ dryRun?: boolean; } /** * Open an auto-PR for a design system diff. Safe to call when there * are no changes — returns `skipped-no-changes`. */ export declare function openAutoPR(opts: AutoPrOptions): Promise;