Fix runtime to call new token refresh (#7084)

This commit is contained in:
chuckbutkus 2025-03-03 15:36:27 -05:00 committed by GitHub
parent 3d38a105cf
commit 4e4f4d64f8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

View File

@ -51,6 +51,9 @@ class GitHubService:
async def get_latest_token(self) -> SecretStr:
return self.token
async def get_latest_provider_token(self) -> SecretStr:
return self.token
async def _fetch_data(
self, url: str, params: dict | None = None
) -> tuple[Any, dict]:

View File

@ -222,7 +222,7 @@ class Runtime(FileEditRuntimeMixin):
if isinstance(event, CmdRunAction):
if self.github_user_id and '$GITHUB_TOKEN' in event.command:
gh_client = GithubServiceImpl(user_id=self.github_user_id)
token = await gh_client.get_latest_token()
token = await gh_client.get_latest_provider_token()
if token:
export_cmd = CmdRunAction(
f"export GITHUB_TOKEN='{token.get_secret_value()}'"