/** * github → forgejo migration entry point. * * Thin by design: Forgejo Actions YAML *is* GitHub Actions YAML, so the * migration applies the same dialect as a `chant build` (drop ignored keys, * resolve `uses:` refs, map runner labels) and emits the result. No stage * inference, job→script rewrite, or `!reference` intrinsic like the gitlab * migration needs. The differentiated value is the security-fate **compare** * (see ./security). */ import type { LintDiagnostic } from "@intentius/chant/lint/rule"; import { type SecurityRecord } from "./security.js"; export interface MigrateOptions { /** Output format. Defaults to "yaml". */ emit?: "yaml" | "ts"; /** Source file path (display only). */ sourceFile?: string; /** Escalate needs-review/lost findings to errors. */ strict?: boolean; /** Accepted for parity with the core MigrationSource contract; forgejo * always runs the (cheap) security analysis. */ security?: boolean; /** Accepted for parity; forgejo has no composite rewriter. */ useComposites?: boolean; } export interface MigrationResult { /** Rendered output (forgejo YAML by default, chant TS when emit: "ts"). */ output: string; /** Per-property security-fate records. */ provenance: SecurityRecord[]; /** SARIF-shaped diagnostics derived from the records. */ diagnostics: LintDiagnostic[]; /** Markdown "Security posture" section. */ securityPosture: string; } /** * Migrate a GitHub Actions workflow into a Forgejo workflow. * * @param content raw .github/workflows/*.yml content * @param opts migration options */ export declare function transform(content: string, opts?: MigrateOptions): Promise; /** * Lightweight detector: does this content look like a GitHub Actions workflow? * Used by the plugin's `migrationSource("github")`. */ export declare function detectGitHubWorkflow(content: string): boolean; //# sourceMappingURL=index.d.ts.map