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