Skip to main content

github_api_base

Function github_api_base 

Source
pub fn github_api_base<E: EnvSource + ?Sized>(env: &E) -> String
Expand description

Resolve the GitHub REST API base URL through an injected env source.

Honors the undocumented ANODIZER_GITHUB_API_BASE override so unit tests can redirect GitHub REST calls to an in-process responder via a MapEnvSource; defaults to the canonical https://api.github.com in production where callers pass ProcessEnvSource and the var is unset. Any trailing / is stripped so callers can unconditionally format! with a /-prefixed suffix without producing a double slash.

Every GitHub REST caller (release-stage rate-limit polls, publish-stage default-branch / PR lookups) must resolve its base through this one helper so a single override redirects the whole run to the same host.