workflow script creation (#3151)

This commit is contained in:
Shuchang Zheng
2025-08-09 13:11:16 -07:00
committed by GitHub
parent 136fa70c48
commit 16596e5c61
4 changed files with 187 additions and 5 deletions

View File

@@ -129,6 +129,7 @@ def _make_decorator(block: dict[str, Any]) -> cst.Decorator:
"file_download": "file_download_block",
"send_email": "email_block",
"wait": "wait_block",
"navigation": "navigation_block",
}[bt]
kwargs = []

View File

@@ -1,5 +1,5 @@
from dataclasses import dataclass
from typing import Any, Iterable, Mapping
from typing import Any
import structlog
@@ -13,10 +13,10 @@ LOG = structlog.get_logger(__name__)
@dataclass
class CodeGenInput:
file_name: str
workflow_run: Mapping[str, Any]
workflow: Mapping[str, Any]
workflow_blocks: Iterable[Mapping[str, Any]]
actions_by_task: Mapping[str, Iterable[Mapping[str, Any]]]
workflow_run: dict[str, Any]
workflow: dict[str, Any]
workflow_blocks: list[dict[str, Any]]
actions_by_task: dict[str, list[dict[str, Any]]]
async def transform_workflow_run_to_code_gen_input(workflow_run_id: str, organization_id: str) -> CodeGenInput: