Skip to main content

factory

Function factory 

Source
pub fn factory(
    cfg: &ReleaseSourceConfig,
    token: Option<SecretString>,
) -> Result<Arc<dyn ReleaseProvider>, ProviderError>
Expand description

Build a GithubProvider from a parsed config and an optional PAT. Enforces HTTPS at construction; any URL with an explicit http:// scheme is rejected via ProviderError::InvalidConfig.

§Errors

Returns ProviderError::InvalidConfig if the host is empty or the reqwest client fails to build (TLS stack misconfiguration, etc.).