Skip to content

Load snippet repository registry - #1295

Closed
danielporterda wants to merge 1 commit into
snippet-parse-if-versionfrom
snippet-load-repository-registry
Closed

Load snippet repository registry#1295
danielporterda wants to merge 1 commit into
snippet-parse-if-versionfrom
snippet-load-repository-registry

Conversation

@danielporterda

@danielporterda danielporterda commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

What changed

Adds a typed loader for the checked-in snippet repository registry.

It reads repository name, canonical GitHub URL, default branch, and visibility; returns entries in deterministic order; and rejects unreadable JSON, missing fields, non-canonical URLs, empty branches, and unsupported visibility values.

This PR does not parse source references or connect the registry to <Snippet> declarations.

Why

Loading and checking the registry's own shape is a separate concern from deciding whether a particular snippet reference belongs to an allowlisted repository.

Validation

  • python -m pytest tests/test_snippet_repository_registry.py (7 passed)
  • python -m ruff check scripts/snippets/registry.py tests/test_snippet_repository_registry.py
  • python -m mypy scripts/snippets/registry.py
  • git diff --check

Signed-off-by: danielporterda <daniel.porter@digitalasset.com>
@danielporterda

Copy link
Copy Markdown
Contributor Author

Closing this draft because the inline release-aware snippet stack is being retired. The branch remains available if its implementation is needed later.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant