{{ define "title" }}pulls · {{ .RepoInfo.FullName }}{{ end }} {{ define "extrameta" }} {{ $title := "pulls"}} {{ $url := printf "https://tangled.sh/%s/pulls" .RepoInfo.FullName }} {{ template "repo/fragments/og" (dict "RepoInfo" .RepoInfo "Title" $title "Url" $url) }} {{ end }} {{ define "repoContent" }}
{{ $owner := index $.DidHandleMap .OwnerDid }} {{ $bgColor := "bg-gray-800 dark:bg-gray-700" }} {{ $icon := "ban" }} {{ if .State.IsOpen }} {{ $bgColor = "bg-green-600 dark:bg-green-700" }} {{ $icon = "git-pull-request" }} {{ else if .State.IsMerged }} {{ $bgColor = "bg-purple-600 dark:bg-purple-700" }} {{ $icon = "git-merge" }} {{ end }} {{ i $icon "w-3 h-3 mr-1.5 text-white" }} {{ .State.String }} {{ $owner }} targeting {{ .TargetBranch }} {{ if not .IsPatchBased }} from {{ if .IsForkBased }} {{ if .PullSource.Repo }} {{ $owner }}/{{ .PullSource.Repo.Name }}: {{- else -}} [deleted fork] {{- end -}} {{- end -}} {{- .PullSource.Branch -}} {{ end }} {{ $latestRound := .LastRoundNumber }} {{ $lastSubmission := index .Submissions $latestRound }} round #{{ .LastRoundNumber }} {{ $commentCount := len $lastSubmission.Comments }} {{ $s := "s" }} {{ if eq $commentCount 1 }} {{ $s = "" }} {{ end }} {{ if eq $commentCount 0 }} awaiting comments {{ else }} recieved {{ len $lastSubmission.Comments}} comment{{$s}} {{ end }}