mirror of
https://github.com/All-Hands-AI/OpenHands.git
synced 2026-01-09 14:57:59 -05:00
[Fix]: fetch latest token when existing token doesn't exist (#8000)
This commit is contained in:
@@ -47,7 +47,7 @@ class GitHubService(BaseGitService, GitService):
|
||||
|
||||
async def _get_github_headers(self) -> dict:
|
||||
"""Retrieve the GH Token from settings store to construct the headers."""
|
||||
if self.user_id and not self.token:
|
||||
if not self.token:
|
||||
self.token = await self.get_latest_token()
|
||||
|
||||
return {
|
||||
|
||||
@@ -48,7 +48,7 @@ class GitLabService(BaseGitService, GitService):
|
||||
"""
|
||||
Retrieve the GitLab Token to construct the headers
|
||||
"""
|
||||
if self.user_id and not self.token:
|
||||
if not self.token:
|
||||
self.token = await self.get_latest_token()
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user