Expand description
Forge, repository, and technology detection.
One pass reads git remote get-url origin: the path is the project, the
host chooses the forge. An unrecognized host is never defaulted — a wrong
guess runs protection calls against the wrong API and fails partway
through a setup — so callers refuse and name the override flags instead.
The technology is read from the version file, exactly as the bindings
define it.
Structs§
- Detection
- What one detection pass observed; every field is an observation, and refusing on what is absent is the caller’s decision.
Enums§
- Forge
- A supported forge.
Functions§
- detect
- Read the
originremote ofdirand map it, without judging. - forge_
for_ host - The forge a host maps to.
gitlab.comand hosts that name gitlab map to GitLab; a self-hosted instance on a host name that says nothing needs--forge. - split_
remote - Host and project path from a git remote URL, for the URL and
scp-like forms. The path drops a leading slash and a.gitsuffix. - tech_of
- The technology of a repository, read from its version file:
Cargo.tomlmeans rust,pyproject.tomlmeans python, aVERSIONfile means bash.