MCPcopy Create free account
hub / github.com/SourceCode-AI/aura / from_url

Method from_url

aura/github.py:41–56  ·  view source on GitHub ↗
(cls, url: str)

Source from the content-addressed store, hash-verified

39
40 @classmethod
41 def from_url(cls, url: str) -> GitHub:
42 parsed = urlparse(url)
43
44 if parsed.netloc != "github.com":
45 raise NoSuchRepository(url)
46
47 paths = parsed.path.lstrip("/").split("/")
48 if len(paths) < 2:
49 raise NoSuchRepository(url)
50
51 repo_name: str = paths[1]
52
53 if repo_name.endswith(".git"):
54 repo_name = repo_name[:-4]
55
56 return cls(owner=paths[0], repo_name=repo_name)
57
58 @classmethod
59 def time_to_reset(cls) -> float:

Callers 5

test_github_apiFunction · 0.80
test_github_cacheFunction · 0.80
load_githubMethod · 0.80

Calls 1

NoSuchRepositoryClass · 0.85

Tested by 4

test_github_apiFunction · 0.64
test_github_cacheFunction · 0.64