True if URL host is github.com or a subdomain (not e.g. evilgithub.com).
(url: str)
| 43 | |
| 44 | |
| 45 | def _is_github_host(url: str) -> bool: |
| 46 | """True if URL host is github.com or a subdomain (not e.g. evilgithub.com).""" |
| 47 | host = (urllib.parse.urlparse(url).hostname or "").lower() |
| 48 | return host == "github.com" or host.endswith(".github.com") |
| 49 | |
| 50 | |
| 51 | def _matches_glob(url: str, pattern: str) -> bool: |
no outgoing calls
no test coverage detected
searching dependent graphs…