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

{{ .Pull.Title }} #{{ .Pull.PullId }}

{{ $bgColor := "bg-gray-800 dark:bg-gray-700" }} {{ $icon := "ban" }} {{ if .Pull.State.IsOpen }} {{ $bgColor = "bg-green-600 dark:bg-green-700" }} {{ $icon = "git-pull-request" }} {{ else if .Pull.State.IsMerged }} {{ $bgColor = "bg-purple-600 dark:bg-purple-700" }} {{ $icon = "git-merge" }} {{ end }}
{{ i $icon "w-4 h-4 mr-1.5 text-white" }} {{ .Pull.State.String }}
opened by {{ $owner := index $.DidHandleMap .Pull.OwnerDid }} {{ $owner }} targeting {{ .Pull.TargetBranch }} {{ if not .Pull.IsPatchBased }} from {{ if .Pull.IsForkBased }} {{ if .Pull.PullSource.Repo }} {{ $owner }}/{{ .Pull.PullSource.Repo.Name }}: {{- else -}} [deleted fork] {{- end -}} {{- end -}} {{- .Pull.PullSource.Branch -}} {{ end }}
{{ if .Pull.Body }}
{{ .Pull.Body | markdown }}
{{ end }}
{{ end }}