this repo has no description
1{{ define "title" }}pipelines · {{ .RepoInfo.FullName }}{{ end }}
2
3{{ define "extrameta" }}
4 {{ $title := "pipelines" }}
5 {{ $url := printf "https://tangled.sh/%s/pipelines" .RepoInfo.FullName }}
6 {{ template "repo/fragments/og" (dict "RepoInfo" .RepoInfo "Title" $title "Url" $url) }}
7{{ end }}
8
9{{ define "repoContent" }}
10 <div class="flex justify-between items-center gap-4">
11 <div class="w-full flex flex-col gap-2">
12 {{ range .Pipelines }}
13 {{ block "pipeline" (list $ .) }}{{ end }}
14 {{ else }}
15 <p class="text-center pt-5 text-gray-400 dark:text-gray-500">
16 No pipelines run for this repository.
17 </p>
18 {{ end }}
19 </div>
20 </div>
21{{ end }}
22
23{{ define "pipeline" }}
24 {{ $root := index . 0 }}
25 {{ $p := index . 1 }}
26 <div class="py-2 bg-white dark:bg-gray-800 dark:text-white">
27 {{ block "pipelineHeader" $ }}{{ end }}
28 </div>
29{{ end }}
30
31{{ define "pipelineHeader" }}
32 {{ $root := index . 0 }}
33 {{ $p := index . 1 }}
34 {{ with $p }}
35 <div class="grid grid-cols-6 md:grid-cols-12 gap-2 items-center w-full">
36 <div class="text-sm md:text-base col-span-1">
37 {{ .Trigger.Kind.String }}
38 </div>
39
40 <div class="col-span-2 md:col-span-7 flex items-center gap-4">
41 {{ $target := .Trigger.TargetRef }}
42 {{ $workflows := .Workflows }}
43 {{ $link := "" }}
44 {{ if .IsResponding }}
45 {{ $link = printf "/%s/pipelines/%s/workflow/%d" $root.RepoInfo.FullName .Id (index $workflows 0) }}
46 {{ end }}
47 {{ if .Trigger.IsPush }}
48 <span class="font-bold">{{ $target }}</span>
49 <span
50 class="hidden md:inline-flex gap-2 items-center font-mono text-sm">
51 {{ $old := deref .Trigger.PushOldSha }}
52 {{ $new := deref .Trigger.PushNewSha }}
53
54
55 <a href="/{{ $root.RepoInfo.FullName }}/commit/{{ $new }}">
56 {{ slice $new 0 8 }}
57 </a>
58 {{ i "arrow-left" "size-4" }}
59 <a href="/{{ $root.RepoInfo.FullName }}/commit/{{ $old }}">
60 {{ slice $old 0 8 }}
61 </a>
62 </span>
63 {{ else if .Trigger.IsPullRequest }}
64 {{ $sha := deref .Trigger.PRSourceSha }}
65 <span class="inline-flex gap-2 items-center">
66 <span class="font-bold">{{ $target }}</span>
67 {{ i "arrow-left" "size-4" }}
68 {{ .Trigger.PRSourceBranch }}
69 <span class="text-sm font-mono">
70 @
71 <a href="/{{ $root.RepoInfo.FullName }}/commit/{{ $sha }}">
72 {{ slice $sha 0 8 }}
73 </a>
74 </span>
75 </span>
76 {{ end }}
77 </div>
78
79 <div class="text-sm md:text-base col-span-1">
80 {{ template "repo/pipelines/fragments/pipelineSymbolLong" (dict "Pipeline" . "RepoInfo" $root.RepoInfo) }}
81 </div>
82
83 <div class="text-sm md:text-base col-span-1 text-right">
84 {{ template "repo/fragments/shortTimeAgo" .Created }}
85 </div>
86
87 {{ $t := .TimeTaken }}
88 <div class="text-sm md:text-base col-span-1 text-right">
89 {{ if $t }}
90 <time title="{{ $t }}">{{ $t | durationFmt }}</time>
91 {{ else }}
92 <time>--</time>
93 {{ end }}
94 </div>
95
96 <div class="col-span-1 flex justify-end">
97 {{ if $link }}
98 <a
99 class="md:hidden"
100 href="/{{ $root.RepoInfo.FullName }}/pipelines/{{ .Id }}/workflow/{{ index $workflows 0 }}">
101 {{ i "arrow-up-right" "size-4" }}
102 </a>
103 <a
104 class="hidden md:inline underline"
105 href="/{{ $root.RepoInfo.FullName }}/pipelines/{{ .Id }}/workflow/{{ index $workflows 0 }}">
106 view
107 </a>
108 {{ end }}
109 </div>
110 </div>
111 {{ end }}
112{{ end }}