this repo has no description
1{{ define "title" }}pulls · {{ .RepoInfo.FullName }}{{ end }}
2
3{{ define "repoContent" }}
4 <div class="flex justify-between items-center">
5 <div class="flex gap-4">
6 <a
7 href="?state=open"
8 class="flex items-center gap-2 {{ if .FilteringBy.IsOpen }}font-bold {{ else }}text-gray-500 dark:text-gray-400{{ end }}"
9 >
10 {{ i "git-pull-request" "w-4 h-4" }}
11 <span>{{ .RepoInfo.Stats.PullCount.Open }} open</span>
12 </a>
13 <a
14 href="?state=merged"
15 class="flex items-center gap-2 {{ if .FilteringBy.IsMerged }}font-bold {{ else }}text-gray-500 dark:text-gray-400{{ end }}"
16 >
17 {{ i "git-merge" "w-4 h-4" }}
18 <span>{{ .RepoInfo.Stats.PullCount.Merged }} merged</span>
19 </a>
20 <a
21 href="?state=closed"
22 class="flex items-center gap-2 {{ if .FilteringBy.IsClosed }}font-bold {{ else }}text-gray-500 dark:text-gray-400{{ end }}"
23 >
24 {{ i "ban" "w-4 h-4" }}
25 <span>{{ .RepoInfo.Stats.PullCount.Closed }} closed</span>
26 </a>
27 </div>
28 <a
29 href="/{{ .RepoInfo.FullName }}/pulls/new"
30 class="btn text-sm flex items-center gap-2 no-underline hover:no-underline"
31 >
32 {{ i "git-pull-request-create" "w-4 h-4" }}
33 <span>new</span>
34 </a>
35 </div>
36 <div class="error" id="pulls"></div>
37{{ end }}
38
39{{ define "repoAfter" }}
40 <div class="flex flex-col gap-2 mt-2">
41 {{ range .Pulls }}
42 <div class="rounded drop-shadow-sm bg-white dark:bg-gray-800 px-6 py-4">
43 <div class="pb-2">
44 <a href="/{{ $.RepoInfo.FullName }}/pulls/{{ .PullId }}" class="dark:text-white">
45 {{ .Title }}
46 <span class="text-gray-500 dark:text-gray-400">#{{ .PullId }}</span>
47 </a>
48 </div>
49 <p class="text-sm text-gray-500 dark:text-gray-400">
50 {{ $owner := index $.DidHandleMap .OwnerDid }}
51 {{ $bgColor := "bg-gray-800 dark:bg-gray-700" }}
52 {{ $icon := "ban" }}
53
54 {{ if .State.IsOpen }}
55 {{ $bgColor = "bg-green-600 dark:bg-green-700" }}
56 {{ $icon = "git-pull-request" }}
57 {{ else if .State.IsMerged }}
58 {{ $bgColor = "bg-purple-600 dark:bg-purple-700" }}
59 {{ $icon = "git-merge" }}
60 {{ end }}
61
62
63 <span
64 class="inline-flex items-center rounded px-2 py-[5px] {{ $bgColor }} text-sm"
65 >
66 {{ i $icon "w-3 h-3 mr-1.5 text-white" }}
67 <span class="text-white">{{ .State.String }}</span>
68 </span>
69
70 <span>
71 <a href="/{{ $owner }}" class="dark:text-gray-300">{{ $owner }}</a>
72 </span>
73
74 <span class="before:content-['·']">
75 <time>
76 {{ .Created | timeFmt }}
77 </time>
78 </span>
79
80 <span class="before:content-['·']">
81 targeting
82 <span class="text-xs rounded bg-gray-100 dark:bg-gray-700 text-black dark:text-white font-mono px-2 mx-1/2 inline-flex items-center">
83 {{ .TargetBranch }}
84 </span>
85 </span>
86 {{ if not .IsPatchBased }}
87 from
88 <span class="text-xs rounded bg-gray-100 dark:bg-gray-700 text-black dark:text-white font-mono px-2 mx-1/2 inline-flex items-center">
89 {{ if .IsForkBased }}
90 {{ if .PullSource.Repo }}
91 <a href="/{{ $owner }}/{{ .PullSource.Repo.Name }}" class="no-underline hover:underline">{{ $owner }}/{{ .PullSource.Repo.Name }}</a>:
92 {{- else -}}
93 <span class="italic">[deleted fork]</span>
94 {{- end -}}
95 {{- end -}}
96 {{- .PullSource.Branch -}}
97 </span>
98 {{ end }}
99 <span class="before:content-['·']">
100 {{ $latestRound := .LastRoundNumber }}
101 {{ $lastSubmission := index .Submissions $latestRound }}
102 round
103 <span class="text-xs rounded bg-gray-100 dark:bg-gray-700 text-black dark:text-white font-mono px-2 mx-1/2 inline-flex items-center">
104 #{{ .LastRoundNumber }}
105 </span>
106 {{ $commentCount := len $lastSubmission.Comments }}
107 {{ $s := "s" }}
108 {{ if eq $commentCount 1 }}
109 {{ $s = "" }}
110 {{ end }}
111
112 {{ if eq $commentCount 0 }}
113 awaiting comments
114 {{ else }}
115 recieved {{ len $lastSubmission.Comments}} comment{{$s}}
116 {{ end }}
117 </span>
118 </p>
119 </div>
120 {{ end }}
121 </div>
122{{ end }}