Skip to content

feat: chant migrate --use-composites (Node patterns) #92

Closed

Description

@lex00

Today the transformer emits raw Job + Image + Cache + script for every workflow. This issue adds a pattern-recognition layer that rewrites recognised step sequences into composite calls.

chant migrate <...> --emit ts --use-composites

v1 covers Node shapes only:

  • Checkout + SetupNode + npm/yarn/pnpm/bun ci + build + test → NodePipeline({...})
  • Checkout + SetupNode + npm/yarn/pnpm/bun ci + test (no build) → NodeCI({...})
  • Package manager detected from installCommand (npm ci / yarn install / pnpm install / bun install).

The recogniser runs on the GitLab IR (post-transform), not the GitHub IR. Off by default — --use-composites opts in. Pattern recognisers are pure IR rewrites with their own unit tests.

Follow-ups (separate issues): Python (PythonPipeline), Docker (DockerBuild), Go, deploy-environment shapes.

Done when

  • pattern-recognisers.ts lands with the Node patterns above.
  • --use-composites flag wired through CLI.
  • Output for lexicons/github/examples/node-ci/ produces a NodePipeline() call (compare against lexicons/gitlab/examples/node-pipeline/).
  • When the pattern doesn't match cleanly, falls back to raw constructors with no NeedsReview (deterministic).

Depends on: #85, #89.

Activity

  1. added
    enhancement
    on May 23, 2026
  2. lex00 commented on May 23, 2026

    @lex00
    ContributorAuthor

    Implemented in 86de4a3 on feat/migrate-github-to-gitlab. PR #99 is open (draft); CI green (check / test / validate / link-check all pass). Awaiting merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions