this repo has no description
1{{ define "title" }}pulls &middot; {{ .RepoInfo.FullName }}{{ end }} 2 3{{ define "extrameta" }} 4 {{ $title := "pulls" }} 5 {{ $url := printf "https://tangled.sh/%s/pulls" .RepoInfo.FullName }} 6 7 {{ template "repo/fragments/og" (dict "RepoInfo" .RepoInfo "Title" $title "Url" $url) }} 8{{ end }} 9 10{{ define "repoContent" }} 11 <div class="flex justify-between items-center"> 12 <div class="flex gap-4"> 13 <a 14 href="?state=open" 15 class="flex items-center gap-2 {{ if .FilteringBy.IsOpen }} 16 font-bold 17 {{ else }} 18 text-gray-500 dark:text-gray-400 19 {{ end }}"> 20 {{ i "git-pull-request" "w-4 h-4" }} 21 <span>{{ .RepoInfo.Stats.PullCount.Open }} open</span> 22 </a> 23 <a 24 href="?state=merged" 25 class="flex items-center gap-2 {{ if .FilteringBy.IsMerged }} 26 font-bold 27 {{ else }} 28 text-gray-500 dark:text-gray-400 29 {{ end }}"> 30 {{ i "git-merge" "w-4 h-4" }} 31 <span>{{ .RepoInfo.Stats.PullCount.Merged }} merged</span> 32 </a> 33 <a 34 href="?state=closed" 35 class="flex items-center gap-2 {{ if .FilteringBy.IsClosed }} 36 font-bold 37 {{ else }} 38 text-gray-500 dark:text-gray-400 39 {{ end }}"> 40 {{ i "ban" "w-4 h-4" }} 41 <span>{{ .RepoInfo.Stats.PullCount.Closed }} closed</span> 42 </a> 43 </div> 44 <a 45 href="/{{ .RepoInfo.FullName }}/pulls/new" 46 class="btn-create text-sm flex items-center gap-2 no-underline hover:no-underline hover:text-white"> 47 {{ i "git-pull-request-create" "w-4 h-4" }} 48 <span>new</span> 49 </a> 50 </div> 51 <div class="error" id="pulls"></div> 52{{ end }} 53 54{{ define "repoAfter" }} 55 <div class="flex flex-col gap-2 mt-2"> 56 {{ range .Pulls }} 57 <div class="rounded bg-white dark:bg-gray-800"> 58 <div class="px-6 py-4 z-5"> 59 <div class="pb-2"> 60 <a 61 href="/{{ $.RepoInfo.FullName }}/pulls/{{ .PullId }}" 62 class="dark:text-white"> 63 {{ .Title }} 64 <span class="text-gray-500 dark:text-gray-400"> 65 #{{ .PullId }} 66 </span> 67 </a> 68 </div> 69 <div 70 class="text-sm text-gray-500 dark:text-gray-400 flex flex-wrap items-center gap-1"> 71 {{ $bgColor := "bg-gray-800 dark:bg-gray-700" }} 72 {{ $icon := "ban" }} 73 74 {{ if .State.IsOpen }} 75 {{ $bgColor = "bg-green-600 dark:bg-green-700" }} 76 {{ $icon = "git-pull-request" }} 77 {{ else if .State.IsMerged }} 78 {{ $bgColor = "bg-purple-600 dark:bg-purple-700" }} 79 {{ $icon = "git-merge" }} 80 {{ end }} 81 82 83 <span 84 class="inline-flex items-center rounded px-2 py-[5px] {{ $bgColor }} text-sm"> 85 {{ i $icon "w-3 h-3 mr-1.5 text-white" }} 86 <span class="text-white">{{ .State.String }}</span> 87 </span> 88 89 <span class="ml-1"> 90 {{ template "user/fragments/picHandleLink" .OwnerDid }} 91 </span> 92 93 <span class="before:content-['·']"> 94 {{ template "repo/fragments/time" .Created }} 95 </span> 96 97 {{ $latestRound := .LastRoundNumber }} 98 {{ $lastSubmission := index .Submissions $latestRound }} 99 100 101 <span class="before:content-['·']"> 102 {{ $commentCount := len $lastSubmission.Comments }} 103 {{ $s := "s" }} 104 {{ if eq $commentCount 1 }} 105 {{ $s = "" }} 106 {{ end }} 107 108 {{ len $lastSubmission.Comments }} 109 comment{{ $s }} 110 </span> 111 112 <span class="before:content-['·']"> 113 round 114 <span class="font-mono"> 115 #{{ .LastRoundNumber }} 116 </span> 117 </span> 118 119 {{ $pipeline := index $.Pipelines .LatestSha }} 120 {{ if and $pipeline $pipeline.Id }} 121 <span class="before:content-['·']"></span> 122 {{ template "repo/pipelines/fragments/pipelineSymbol" $pipeline }} 123 {{ end }} 124 </div> 125 </div> 126 {{ if .StackId }} 127 {{ $otherPulls := index $.Stacks .StackId }} 128 {{ if gt (len $otherPulls) 0 }} 129 <details class="bg-white dark:bg-gray-800 group"> 130 <summary 131 class="pb-4 px-6 text-xs list-none cursor-pointer hover:text-gray-500 hover:dark:text-gray-400"> 132 {{ $s := "s" }} 133 {{ if eq (len $otherPulls) 1 }} 134 {{ $s = "" }} 135 {{ end }} 136 <div class="group-open:hidden flex items-center gap-2"> 137 {{ i "chevrons-up-down" "w-4 h-4" }} expand 138 {{ len $otherPulls }} pull{{ $s }} in this stack 139 </div> 140 <div class="hidden group-open:flex items-center gap-2"> 141 {{ i "chevrons-down-up" "w-4 h-4" }} hide 142 {{ len $otherPulls }} pull{{ $s }} in this stack 143 </div> 144 </summary> 145 {{ block "pullList" (list $otherPulls $) }}{{ end }} 146 </details> 147 {{ end }} 148 {{ end }} 149 </div> 150 {{ end }} 151 </div> 152{{ end }} 153 154{{ define "pullList" }} 155 {{ $list := index . 0 }} 156 {{ $root := index . 1 }} 157 <div 158 class="grid grid-cols-1 rounded-b border-b border-t border-gray-200 dark:border-gray-900 divide-y divide-gray-200 dark:divide-gray-900"> 159 {{ range $pull := $list }} 160 {{ $pipeline := index $root.Pipelines $pull.LatestSha }} 161 <a 162 href="/{{ $root.RepoInfo.FullName }}/pulls/{{ $pull.PullId }}" 163 class="no-underline hover:no-underline hover:bg-gray-100/25 hover:dark:bg-gray-700/25"> 164 <div class="flex gap-2 items-center px-6"> 165 <div class="flex-grow min-w-0 w-full py-2"> 166 {{ template "repo/pulls/fragments/summarizedHeader" (list $pull $pipeline) }} 167 </div> 168 </div> 169 </a> 170 {{ end }} 171 </div> 172{{ end }}