Expand description
Distro specifier parsing.
Accepts four input forms and normalizes each to a strongly-typed
DistroSpec { org, repo }:
- bare name
omne-nosce→{ omne-org, omne-nosce }(default org) <org>/<repo>→{ org, repo }(trailing.gitstripped)- HTTPS URL
https://github.com/<org>/<repo>(.git)? - SSH URL
git@github.com:<org>/<repo>(.git)?
The returned struct drops the URL form the Python parser emitted
because downstream code (github.rs in Unit 4) keys the GitHub
Releases API on (org, repo) — the URL was never actually used.
Fixes two Python bugs (R12):
file://URLs are rejected outright, not silently accepted.- Non-github.com HTTPS/SSH hosts are rejected explicitly.
Structs§
- Distro
Spec - A parsed distro reference keyed on
(org, repo).
Enums§
- Error
- Errors produced by
parse(). Wrapped intoCliError::Distroat the command boundary once Unit 8a wires distro parsing intoinit::run.
Functions§
- parse
- Parse a distro specifier into
DistroSpec { org, repo }.