{% macro task_state(alias, state, labeling) -%}
{{- "" -}} {{ labeling[alias] }} {%- if state.phony -%} {%- endif -%} {%- if state.stale -%} {%- endif -%}
{{ state.name }}
{%- if state.completed -%}
completed{% if state.span %} in {{ (state.span[1] - state.span[0])|formattimedelta }}{% endif %}
{%- endif %} {%- if state.failures -%}
failed at {{ state.failures.values()|max|formatdatetime }}
{%- endif -%} {%- if state.runs -%}
running since {{ state.runs.values()|min|formatdatetime }}
{%- endif -%}
{%- endmacro %}