MCPcopy
hub / github.com/vinta/awesome-python / extract_github_repo

Function extract_github_repo

website/build.py:83–86  ·  view source on GitHub ↗

Extract owner/repo from a GitHub repo URL. Returns None for non-GitHub URLs.

(url: str)

Source from the content-addressed store, hash-verified

81
82
83def 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
89def load_stars(path: Path) -> dict[str, dict]:

Callers 10

extract_github_reposFunction · 0.90
test_github_urlMethod · 0.90
test_non_github_urlMethod · 0.90
test_github_io_urlMethod · 0.90
test_trailing_slashMethod · 0.90
test_deep_pathMethod · 0.90
test_dot_git_suffixMethod · 0.90
test_org_onlyMethod · 0.90
buildFunction · 0.85

Calls

no outgoing calls

Tested by 7

test_github_urlMethod · 0.72
test_non_github_urlMethod · 0.72
test_github_io_urlMethod · 0.72
test_trailing_slashMethod · 0.72
test_deep_pathMethod · 0.72
test_dot_git_suffixMethod · 0.72
test_org_onlyMethod · 0.72