Skip to content

πŸ™Œ OpenHands: AI-Driven Development

[Bug]: Refresh runtime gh token when agent calls gh apis (#7330)

Rohit Malhotrae2521743b652
diff --git a/openhands/runtime/base.py b/openhands/runtime/base.py
index d4a078b8ef..5ef105996e 100644
--- a/openhands/runtime/base.py
+++ b/openhands/runtime/base.py
@@ -220,7 +220,7 @@ class Runtime(FileEditRuntimeMixin):
assert event.timeout is not None
try:
if isinstance(event, CmdRunAction):
- if self.user_id and '$GITHUB_TOKEN' in event.command:
+ if self.user_id and 'GITHUB_TOKEN' in event.command:
gh_client = GithubServiceImpl(
external_auth_id=self.user_id, external_token_manager=True
)