/** * GitHub Actions extraction (spec-07 deferred follow-up: add-github-actions-workflow-graph). * * Parses `.github/workflows/*.yml` workflow files and `action.yml`/`action.yaml` * action-metadata files together — they are cross-referential (a job's * `uses: ./.github/actions/x` resolves to that action's metadata file) — and * produces the normalized IacGraph that project.ts maps onto FunctionNode/CallEdge. * * Edge direction is dependent → dependency (like the rest of IaC), so depth-1 callers * of a composite action answer "every job that breaks if this action changes", and * depth-1 callers of a job answer "every job whose `needs:` lists it". * * Static only: no `${{ }}` evaluation, no matrix expansion, no `act`, no API calls. * Dynamic references (`uses: ${{ matrix.action }}`, a templated reusable path) and a * local `./` ref whose target is not in the indexed set emit no edge, never a wrong one. */ import type { IacGraph } from './types.js'; interface InFile { path: string; content: string; language?: string; } /** * Placeholder a `${{ … }}` expression is masked to before YAML parsing. GitHub's own * parser tolerates `${{ … }}` anywhere, but strict YAML 1.2 (the `yaml` package) chokes * on it inside a flow mapping — `with: { x: ${{ y }} }` — because `{{`/`}}` read as nested * flow-map delimiters, and the resulting errors desync the parse and drop downstream jobs. * Masking neutralizes that while keeping the value detectable as dynamic (a `uses:` that * contains the sentinel is unresolvable → no edge). Mirrors the Helm `{{ }}` masking pre-pass. */ export declare const GHA_EXPR = "__OPENLORE_GHA_EXPR__"; /** Replace every `${{ … }}` with the sentinel, preserving newline count so line numbers stay stable. */ export declare function maskExpressions(content: string): string; /** True for `.github/workflows/.yml` / `.yaml` (the workflow directory is fixed). */ export declare function isWorkflowPath(path: string): boolean; /** True when a path is an action-metadata file: `action.yml` / `action.yaml`. */ export declare function isActionMetadataPath(path: string): boolean; export declare function extractGitHubActions(files: InFile[]): IacGraph; export {}; //# sourceMappingURL=github-actions.d.ts.map