Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion registry/repos.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"required": ["name", "url", "status"],
"allOf": [
{
"comment": "An operational repo must declare its line endings (release repos use the fleet CRLF default).",
"$comment": "An operational repo must declare its line endings (release repos use the fleet CRLF default).",
"if": { "properties": { "workflowModel": { "const": "operational" } }, "required": ["workflowModel"] },
"then": { "required": ["lineEndings"] }
}
Expand Down
7 changes: 5 additions & 2 deletions spec/validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,11 @@ def check_secret_set(label, entry, need_kind):
if eol is not None and eol not in ("lf", "crlf"):
errors.append(f"{name}: lineEndings '{eol}' invalid (expected lf or crlf)")
# An operational repo's endings follow the consuming app's platform, so they must be declared; a release
# repo omits the field and uses the fleet CRLF default.
if model == "operational" and eol is None:
# repo omits the field and uses the fleet CRLF default. Resolve the effective model the same way
# configure.sh does (repo -> defaults -> release) so the requirement holds even if a repo relies on an
# operational defaults.workflowModel rather than setting it explicitly.
effective_model = model or default_model or "release"
if effective_model == "operational" and eol is None:
errors.append(f"{name}: operational repo must declare lineEndings (lf or crlf)")

required = set(repo.get("requiredSecrets", []))
Expand Down