Skip to content

Commit 6058baa

Browse files
feat(compile): add repos_unified codemod for legacy repositories: + checkout: rewrite
Replaces the previous front-matter migration framework approach with the codemod framework merged in #476. The new 0001_repos_unified codemod detects the legacy repositories: + checkout: shape in raw YAML and rewrites it in place to the unified repos: shape before typed deserialization. Idempotent on already-current sources. Drops the typed repositories: / checkout: fields from FrontMatter (now #[serde(skip)] Rust-only fields populated by lower_repos); the codemod runs first so user YAML never reaches typed deserialization with legacy keys. resolve_repos is simplified accordingly — the codemod owns the mixing/legacy concerns. Updates docs/front-matter.md to point at docs/codemods.md. Co-authored-by: jamesadevine <4742697+jamesadevine@users.noreply.github.com>
1 parent 046775f commit 6058baa

8 files changed

Lines changed: 502 additions & 124 deletions

File tree

docs/front-matter.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -216,13 +216,15 @@ repos:
216216
ref: refs/heads/release/2.x
217217
```
218218
219-
### Legacy syntax (deprecated)
220-
221-
The legacy `repositories:` + `checkout:` fields still work but emit a
222-
deprecation warning. They cannot be mixed with `repos:`. Migrate by
223-
converting each `repositories:` entry into a `repos:` entry — any entry
224-
that appeared in `checkout:` keeps the default `checkout: true`; any that
225-
did not should set `checkout: false`.
219+
### Legacy syntax (auto-rewritten)
220+
221+
The legacy `repositories:` + `checkout:` fields are auto-converted to
222+
`repos:` by the [`repos_unified` codemod](codemods.md). On the next
223+
`ado-aw compile`, any source that still uses the legacy fields is
224+
rewritten in place to the new shape — each `repositories:` entry
225+
becomes a `repos:` entry, with `checkout: false` added for entries
226+
that weren't listed under `checkout:`. Mixing the legacy fields with
227+
an existing `repos:` block is rejected; pick one shape.
226228

227229
## Filter Validation
228230

0 commit comments

Comments
 (0)