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
24{{ define "pipeline" }}
25 {{ $root := index . 0 }}
26 {{ $p := index . 1 }}
27 <div class="py-2 bg-white dark:bg-gray-800 dark:text-white">
28 {{ block "pipelineHeader" $ }} {{ end }}
29 </div>
30{{ end }}
31
32{{ define "pipelineHeader" }}
33 {{ $root := index . 0 }}
34 {{ $p := index . 1 }}
35 {{ with $p }}
36 <div class="grid grid-cols-6 md:grid-cols-12 gap-2 items-center w-full">
37 <div class="col-span-2 md:col-span-8 flex items-center gap-4">
38 {{ $target := .Trigger.TargetRef }}
39 {{ $workflows := .Workflows }}
40 {{ $link := "" }}
41 {{ if .IsResponding }}
42 {{ $link = printf "/%s/pipelines/%s/workflow/%d" $root.RepoInfo.FullName .Id (index $workflows 0) }}
43 {{ end }}
44 {{ if .Trigger.IsPush }}
45 <span class="font-bold">{{ $target }}</span>
46 <span>push</span>
47 <span class="hidden md:inline-flex gap-2 items-center font-mono text-sm">
48 {{ $old := deref .Trigger.PushOldSha }}
49 {{ $new := deref .Trigger.PushNewSha }}
50
51 <a href="/{{ $root.RepoInfo.FullName }}/commit/{{ $new }}">{{ slice $new 0 8 }}</a>
52 {{ i "arrow-left" "size-4" }}
53 <a href="/{{ $root.RepoInfo.FullName }}/commit/{{ $old }}">{{ slice $old 0 8 }}</a>
54 </span>
55 {{ else if .Trigger.IsPullRequest }}
56 <span>
57 pull request
58 <span class="inline-flex gap-2 items-center">
59 {{ $target }}
60 {{ i "arrow-left" "size-4" }}
61 {{ .Trigger.PRSourceBranch }}
62 </span>
63 </span>
64 {{ end }}
65 </div>
66
67 <div class="text-sm md:text-base col-span-1">
68 {{ template "repo/pipelines/fragments/pipelineSymbolLong" (dict "Pipeline" . "RepoInfo" $root.RepoInfo) }}
69 </div>
70
71 <div class="text-sm md:text-base col-span-1 text-right">
72 <time title="{{ .Created | longTimeFmt }}">
73 {{ .Created | shortTimeFmt }} ago
74 </time>
75 </div>
76
77 {{ $t := .TimeTaken }}
78 <div class="text-sm md:text-base col-span-1 text-right">
79 {{ if $t }}
80 <time title="{{ $t }}">{{ $t | durationFmt }}</time>
81 {{ else }}
82 <time>--</time>
83 {{ end }}
84 </div>
85
86 <div class="col-span-1 flex justify-end">
87 {{ if $link }}
88 <a class="md:hidden" href="/{{ $root.RepoInfo.FullName }}/pipelines/{{ .Id }}/workflow/{{ index $workflows 0 }}">
89 {{ i "arrow-up-right" "size-4" }}
90 </a>
91 <a class="hidden md:inline underline" href="/{{ $root.RepoInfo.FullName }}/pipelines/{{ .Id }}/workflow/{{ index $workflows 0 }}">
92 view
93 </a>
94 {{ end }}
95 </div>
96
97 </div>
98 {{ end }}
99{{ end }}