Build a standard GitHub config entry.
(token_env: str = "GH_TOKEN", token: str | None = None)
| 36 | |
| 37 | |
| 38 | def _github_entry(token_env: str = "GH_TOKEN", token: str | None = None) -> AuthConfigEntry: |
| 39 | """Build a standard GitHub config entry.""" |
| 40 | return AuthConfigEntry( |
| 41 | hosts=("github.com", "api.github.com", "raw.githubusercontent.com", "codeload.github.com"), |
| 42 | provider="github", |
| 43 | auth="bearer", |
| 44 | token=token, |
| 45 | token_env=token_env if token is None else None, |
| 46 | ) |
| 47 | |
| 48 | |
| 49 | def _ado_basic_entry(token_env: str = "AZURE_DEVOPS_PAT") -> AuthConfigEntry: |
no test coverage detected