/** * GitHub Actions expression substitution. * * Translates `${{ github.X }}`, `${{ runner.X }}`, `${{ secrets.X }}`, * `${{ env.X }}`, `${{ vars.X }}`, `${{ inputs.X }}`, `${{ matrix.X }}`, * and a small set of expression functions (`always()`, `failure()`, etc.) * to their GitLab CI predefined-variable equivalents. * * Source: the upstream `github-actions-to-gitlab-ci` skill's * `references/syntax-mapping.md` "github.* context expressions" tables. */ import type { ProvenanceRecord } from "./provenance.js"; /** * Map a GitHub `if:` boolean function to a GitLab `when:` value or rule. * * Returned tuple is `[gitlabExpression, isWhenClause]` — when `isWhenClause` * is true, the caller should emit `when: ` rather than `if: `. */ export declare function translateIfFunction(expr: string): { expression: string; whenClause?: string; needsReview?: boolean; }; /** * Substitute all `${{ ... }}` template expressions in a string with their * GitLab equivalents. Returns the substituted string plus any provenance * records describing which substitutions happened (or which need review). */ export declare function substituteExpressions(input: string, ctx: { gitlabPath: string; sourceKey?: string; sourceFile?: string; }): { output: string; provenance: ProvenanceRecord[]; }; /** * Substitute GitHub identifiers (e.g. `github.ref`) appearing anywhere * in a string with their GitLab predefined-variable equivalents. * Used for if-conditions, concurrency.group values, and other places * where identifiers appear without `${{ }}` wrapping. */ export declare function substituteIdentifiers(input: string, ctx: { gitlabPath: string; sourceKey?: string; sourceFile?: string; }): { output: string; provenance: ProvenanceRecord[]; }; /** * Translate a GitHub `if:` condition expression (without `${{ }}` wrapping) * into a GitLab `rules:if:` expression. Returns substituted expression and * any whenClause hint extracted from boolean function calls. */ export declare function translateIfCondition(rawIf: string, ctx: { gitlabPath: string; sourceKey?: string; sourceFile?: string; }): { ifExpression: string; whenClause?: string; provenance: ProvenanceRecord[]; }; //# sourceMappingURL=expressions.d.ts.map