Skip to content

Commit

Permalink
export token before action calls it
Browse files Browse the repository at this point in the history
  • Loading branch information
malhotra5 committed Feb 6, 2025
1 parent d680a2f commit 675d0d8
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions openhands/runtime/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,17 @@ async def _handle_action(self, event: Action) -> None:
event.set_hard_timeout(self.config.sandbox.timeout, blocking=False)
assert event.timeout is not None
try:
if isinstance(event, CmdRunAction):
print('found event action', event.action)
if '$GITHUB_TOKEN' in event.action:
print('token required by action', event.action)
await call_sync_from_async(
self.run,
CmdRunAction(
"export UNTESTED_GITHUB_TOKEN='this is a dummy token'"
),
)

observation: Observation = await call_sync_from_async(
self.run_action, event
)
Expand Down

0 comments on commit 675d0d8

Please sign in to comment.