{{ define "repo/pulls/fragments/pullStack" }}

STACK

{{ block "pullList" (list .Stack $) }} {{ end }} {{ if gt (len .AbandonedPulls) 0 }}

ABANDONED PULLS

{{ block "pullList" (list .AbandonedPulls $) }} {{ end }} {{ end }} {{ end }} {{ define "pullList" }} {{ $list := index . 0 }} {{ $root := index . 1 }}
{{ range $pull := $list }} {{ $isCurrent := false }} {{ 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" $pull }}
{{ end }}
{{ end }}