Skip to content

Commit 57a10d2

Browse files
committed
fix(workflows): fixed on_failure action
1 parent 2ed30fd commit 57a10d2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

keep/parser/parser.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def _parse_workflow(
155155
workflow_steps = self._parse_steps(context_manager, workflow)
156156
workflow_actions = self._parse_actions(context_manager, workflow)
157157
workflow_interval = self.parse_interval(workflow)
158-
on_failure_action = self._get_on_failure_action(workflow)
158+
on_failure_action = self._get_on_failure_action(context_manager, workflow)
159159
workflow_triggers = self.get_triggers_from_workflow(workflow)
160160
workflow_provider_types = (
161161
self._get_workflow_provider_types_from_steps_and_actions(
@@ -531,7 +531,7 @@ def _merge_action_by_use(
531531
extended_action = actions_context.get(action.get("use"), {})
532532
yield ParserUtils.deep_merge(action, extended_action)
533533

534-
def _get_on_failure_action(self, workflow) -> Step | None:
534+
def _get_on_failure_action(self, context_manager: ContextManager, workflow: dict) -> Step | None:
535535
"""
536536
Parse the on-failure action
537537
@@ -541,10 +541,10 @@ def _get_on_failure_action(self, workflow) -> Step | None:
541541
Returns:
542542
Action | None: _description_
543543
"""
544-
self.logger.debug("Parsing on-faliure")
544+
self.logger.debug("Parsing on-failure")
545545
workflow_on_failure = workflow.get("on-failure", {})
546546
if workflow_on_failure:
547-
parsed_action = self._get_action(workflow_on_failure, "on-faliure")
547+
parsed_action = self._get_action(context_manager=context_manager, action=workflow_on_failure, action_name="on-failure")
548548
self.logger.debug("Parsed on-failure successfully")
549549
return parsed_action
550550
self.logger.debug("No on-failure action")

0 commit comments

Comments
 (0)