Expand description
GitHub source — shallow-clone a ref into the global store (tar.gz fallback),
with ref-candidate fallbacks and token auth. Rust port of sources/github.ts.
Clones happen via a git SHELL-OUT (not a git library) so the opensrc
authenticated_clone_url token injection + redact_token scrubbing port
verbatim, including the #66 host-confusion fix.
Structs§
- Github
Options - Options for a github fetch (port of
GithubSourceOptions).
Functions§
- authenticated_
clone_ url - Rewrite an HTTPS GitHub clone URL to embed
x-access-token:<token>auth, but ONLY on an exactgithub.comhost overhttps(opensrc #66: prefix/suffix- confusable hosts, subdomains, non-https schemes, and ssh remotes pass through unchanged). The result carries the secret — use it only as a git argument, never in logs. - fetch
- Fetch docs for a github entry, materializing the checkout into the store.
- github_
token - The
GITHUB_TOKENfrom the environment, empty string treated as absent.