Move GitHub Token export to backend (#6153)

Co-authored-by: openhands <openhands@all-hands.dev>
This commit is contained in:
Robert Brennan
2025-01-08 16:12:46 -05:00
committed by GitHub
parent 386e04a2ba
commit c411a29db4
4 changed files with 11 additions and 28 deletions

View File

@@ -180,6 +180,13 @@ class AgentSession:
logger.debug(f'Initializing runtime `{runtime_name}` now...')
runtime_cls = get_runtime_cls(runtime_name)
env_vars = (
{
'GITHUB_TOKEN': github_token,
}
if github_token
else None
)
self.runtime = runtime_cls(
config=config,
event_stream=self.event_stream,
@@ -187,6 +194,7 @@ class AgentSession:
plugins=agent.sandbox_plugins,
status_callback=self._status_callback,
headless_mode=False,
env_vars=env_vars,
)
# FIXME: this sleep is a terrible hack.