Return host patterns from every ``github`` provider entry in ``auth.json``. Used to classify which hosts are GitHub Enterprise Server instances when resolving release-asset download URLs. Returns an empty tuple when no ``auth.json`` exists or it contains no ``github`` entries.
()
| 119 | |
| 120 | |
| 121 | def github_provider_hosts() -> tuple[str, ...]: |
| 122 | """Return host patterns from every ``github`` provider entry in ``auth.json``. |
| 123 | |
| 124 | Used to classify which hosts are GitHub Enterprise Server instances when |
| 125 | resolving release-asset download URLs. Returns an empty tuple when no |
| 126 | ``auth.json`` exists or it contains no ``github`` entries. |
| 127 | """ |
| 128 | hosts: list[str] = [] |
| 129 | for entry in _load_config(): |
| 130 | if entry.provider == "github": |
| 131 | hosts.extend(entry.hosts) |
| 132 | return tuple(hosts) |
| 133 | |
| 134 | |
| 135 | def open_url( |