@@ -417,31 +417,19 @@ def _format_steps_for_slack(
417417 details : List [str ] = []
418418 details .append (f"*{ prefix } *" )
419419
420- # If one-step format, only show the last step
420+ for step_status , step_name , step_message in steps :
421+ if step_status == StepStatus .SUCCEEDED :
422+ details .append (f"• ✅ { step_name } " )
423+ elif step_status == StepStatus .RUNNING :
424+ details .append (f"• ⏳ { step_name } " )
425+ elif step_status == StepStatus .NOT_STARTED :
426+ details .append (f"• ⚪ { step_name } " )
427+ else : # FAILED or INCORRECT
428+ msg = f" ({ step_message } )" if step_message else ""
429+ details .append (f"• ❌ { step_name } { msg } " )
430+ break
431+
421432 if self .slack_format == SlackFormat .ONE_STEP :
422- if steps :
423- step_status , step_name , step_message = steps [- 1 ]
424- if step_status == StepStatus .SUCCEEDED :
425- details .append (f"• ✅ { step_name } " )
426- elif step_status == StepStatus .RUNNING :
427- details .append (f"• ⏳ { step_name } " )
428- elif step_status == StepStatus .NOT_STARTED :
429- details .append (f"• ⚪ { step_name } " )
430- else : # FAILED or INCORRECT
431- msg = f" ({ step_message } )" if step_message else ""
432- details .append (f"• ❌ { step_name } { msg } " )
433- else :
434- # Default format: show all steps
435- for step_status , step_name , step_message in steps :
436- if step_status == StepStatus .SUCCEEDED :
437- details .append (f"• ✅ { step_name } " )
438- elif step_status == StepStatus .RUNNING :
439- details .append (f"• ⏳ { step_name } " )
440- elif step_status == StepStatus .NOT_STARTED :
441- details .append (f"• ⚪ { step_name } " )
442- else : # FAILED or INCORRECT
443- msg = f" ({ step_message } )" if step_message else ""
444- details .append (f"• ❌ { step_name } { msg } " )
445- break
433+ details = details [- 1 :]
446434
447435 return details
0 commit comments