MCPcopy Create free account
hub / github.com/HKUDS/AutoAgent / __init__

Method __init__

autoagent/tools/github_client.py:71–86  ·  view source on GitHub ↗

Initialize the GitHub searcher Args: token: GitHub Personal Access Token, optional

(self, token: Optional[str] = None)

Source from the content-addressed store, hash-verified

69
70class GitHubSearcher:
71 def __init__(self, token: Optional[str] = None):
72 """
73 Initialize the GitHub searcher
74
75 Args:
76 token: GitHub Personal Access Token, optional
77 """
78 self.session = requests.Session()
79 if token:
80 self.session.headers.update({
81 'Authorization': f'token {token}',
82 'Accept': 'application/vnd.github.v3+json'
83 })
84 self.session.headers.update({
85 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36'
86 })
87
88 # def search_code(self,
89 # repo_owner: str,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected