{{ define "repo/pulls/fragments/pullStack" }}
{{ i "chevrons-up-down" "w-4 h-4" }} STACK {{ len .Stack }} {{ block "pullList" (list .Stack $) }} {{ end }}
{{ if gt (len .AbandonedPulls) 0 }}
{{ i "chevrons-up-down" "w-4 h-4" }} ABANDONED PULLS {{ len .AbandonedPulls }} {{ block "pullList" (list .AbandonedPulls $) }} {{ end }}
{{ end }} {{ end }} {{ define "pullList" }} {{ $list := index . 0 }} {{ $root := index . 1 }}
{{ range $pull := $list }} {{ $isCurrent := false }} {{ $pipeline := index $root.Pipelines $pull.LatestSha }} {{ with $root.Pull }} {{ $isCurrent = eq $pull.PullId $root.Pull.PullId }} {{ end }}
{{ if $isCurrent }}
{{ i "arrow-right" "w-4 h-4" }}
{{ end }}
{{ template "repo/pulls/fragments/summarizedHeader" (list $pull $pipeline) }}
{{ end }}
{{ end }}