MCPcopy Create free account
hub / github.com/omkarcloud/botasaurus / validateRepository

Function validateRepository

bota/src/bota/vm.py:101–109  ·  view source on GitHub ↗

Checks if a GitHub repository exists. Raises an exception if not.

(git_repo_url)

Source from the content-addressed store, hash-verified

99 """
100 return '\n'.join(line for line in text.split('\n') if line.strip())
101def validateRepository(git_repo_url):
102 """Checks if a GitHub repository exists. Raises an exception if not."""
103 try:
104 response = requests.head(git_repo_url, allow_redirects=True, timeout=20)
105 response.raise_for_status()
106 except requests.exceptions.RequestException as e:
107 if "Not Found" in str(e):
108 raise Exception(f"No repository found with URL: {git_repo_url}. Kindly check the URL.")
109 raise Exception(f"Repository validation failed: {e}")
110
111def extractRepositoryName(git_repo_url):
112 """Extracts repository name from a GitHub URL"""

Callers 2

install_ui_scraper_in_vmFunction · 0.85
install_scraper_in_vmFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected