Add workflow_title to WorkflowRun (#1731)

This commit is contained in:
Shuchang Zheng 2025-02-06 03:10:17 +08:00 committed by GitHub
parent cc449dc9de
commit c330c6a455
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 30 additions and 11 deletions

View file

@ -192,7 +192,9 @@ def convert_to_workflow(workflow_model: WorkflowModel, debug_enabled: bool = Fal
)
def convert_to_workflow_run(workflow_run_model: WorkflowRunModel, debug_enabled: bool = False) -> WorkflowRun:
def convert_to_workflow_run(
workflow_run_model: WorkflowRunModel, workflow_title: str | None = None, debug_enabled: bool = False
) -> WorkflowRun:
if debug_enabled:
LOG.debug(
"Converting WorkflowRunModel to WorkflowRun",
@ -215,6 +217,7 @@ def convert_to_workflow_run(workflow_run_model: WorkflowRunModel, debug_enabled:
totp_identifier=workflow_run_model.totp_identifier,
created_at=workflow_run_model.created_at,
modified_at=workflow_run_model.modified_at,
workflow_title=workflow_title,
)