Skip to content

Commit

Permalink
make totp_identifier parametrized in workflow (#847)
Browse files Browse the repository at this point in the history
  • Loading branch information
wintonzheng authored Sep 19, 2024
1 parent 30922a3 commit ffaf3ab
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions skyvern/forge/sdk/workflow/models/block.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,20 @@ async def execute(self, workflow_run_id: str, **kwargs: dict) -> BlockResult:
)
self.url = task_url_parameter_value

if (
self.totp_identifier
and workflow_run_context.has_parameter(self.totp_identifier)
and workflow_run_context.has_value(self.totp_identifier)
):
totp_identifier_parameter_value = workflow_run_context.get_value(self.totp_identifier)
if totp_identifier_parameter_value:
LOG.info(
"TOTP identifier is parameterized, using parameter value",
totp_identifier_parameter_value=totp_identifier_parameter_value,
totp_identifier_parameter_key=self.totp_identifier,
)
self.totp_identifier = totp_identifier_parameter_value

if self.download_suffix and workflow_run_context.has_parameter(self.download_suffix):
download_suffix_parameter_value = workflow_run_context.get_value(self.download_suffix)
if download_suffix_parameter_value:
Expand Down

0 comments on commit ffaf3ab

Please sign in to comment.