MCPcopy Index your code
hub / github.com/TaskingAI/TaskingAI / verify

Method verify

plugin/bundles/github/bundle.py:8–25  ·  view source on GitHub ↗
(self, credentials: BundleCredentials)

Source from the content-addressed store, hash-verified

6
7class Github(BundleHandler):
8 async def verify(self, credentials: BundleCredentials):
9 query: str = "taskingai"
10 github_api_key: str = credentials.credentials.get("GITHUB_API_KEY")
11
12 url = f'https://api.github.com/search/repositories?q={query}'
13
14 headers = {
15 'Authorization': f'Bearer {github_api_key}',
16 'Content-Type': 'application/json',
17 'X-GitHub-Api-Version': '2022-11-28'
18 }
19
20 async with ClientSession() as session:
21 async with session.get(url=url, headers=headers, proxy=CONFIG.PROXY) as response:
22 if response.status == 200:
23 pass
24 else:
25 raise_credentials_validation_error()

Callers

nothing calls this directly

Calls 2

getMethod · 0.45

Tested by

no test coverage detected