hotfix(Secrets): Add event stream filter for refreshed secret (#6764)

This commit is contained in:
Rohit Malhotra 2025-02-17 13:27:32 -05:00 committed by GitHub
parent 57391d6e66
commit 14ee6d7afe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 0 deletions

View File

@ -282,6 +282,9 @@ class EventStream:
def set_secrets(self, secrets: dict[str, str]):
self.secrets = secrets.copy()
def update_secrets(self, secrets: dict[str, str]):
self.secrets.update(secrets)
def _replace_secrets(self, data: dict) -> dict:
for key in data:
if isinstance(data[key], dict):

View File

@ -225,6 +225,13 @@ class Runtime(FileEditRuntimeMixin):
export_cmd = CmdRunAction(
f"export GITHUB_TOKEN='{token.get_secret_value()}'"
)
self.event_stream.update_secrets(
{
'github_token': token.get_secret_value(),
}
)
await call_sync_from_async(self.run, export_cmd)
observation: Observation = await call_sync_from_async(