mirror of
https://github.com/OpenHands/OpenHands.git
synced 2026-03-22 13:47:19 +08:00
Move GitHub Token export to backend (#6153)
Co-authored-by: openhands <openhands@all-hands.dev>
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user