Extract owner/repo from a GitHub repo URL. Returns None for non-GitHub URLs.
(url: str)
| 81 | |
| 82 | |
| 83 | def extract_github_repo(url: str) -> str | None: |
| 84 | """Extract owner/repo from a GitHub repo URL. Returns None for non-GitHub URLs.""" |
| 85 | m = GITHUB_REPO_URL_RE.match(url) |
| 86 | return m.group(1) if m else None |
| 87 | |
| 88 | |
| 89 | def load_stars(path: Path) -> dict[str, dict]: |
no outgoing calls