mirror of
https://github.com/All-Hands-AI/OpenHands.git
synced 2026-04-29 03:00:45 -04:00
Use generic token check in order to support Github Apps (#8048)
Co-authored-by: Rohit Malhotra <rohitvinodmalhotra@gmail.com>
This commit is contained in:
@@ -120,6 +120,12 @@ class GitHubService(BaseGitService, GitService):
|
||||
email=response.get('email'),
|
||||
)
|
||||
|
||||
async def verify_access(self) -> bool:
|
||||
"""Verify if the token is valid by making a simple request."""
|
||||
url = f'{self.BASE_URL}'
|
||||
await self._make_request(url)
|
||||
return True
|
||||
|
||||
async def _fetch_paginated_repos(
|
||||
self, url: str, params: dict, max_repos: int, extract_key: str | None = None
|
||||
) -> list[dict]:
|
||||
|
||||
Reference in New Issue
Block a user