this repo has no description
1{{ define "title" }}pipelines &middot; {{ .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="text-sm md:text-base col-span-1"> 38 {{ .Trigger.Kind.String }} 39 </div> 40 41 <div class="col-span-2 md:col-span-7 flex items-center gap-4"> 42 {{ $target := .Trigger.TargetRef }} 43 {{ $workflows := .Workflows }} 44 {{ $link := "" }} 45 {{ if .IsResponding }} 46 {{ $link = printf "/%s/pipelines/%s/workflow/%d" $root.RepoInfo.FullName .Id (index $workflows 0) }} 47 {{ end }} 48 {{ if .Trigger.IsPush }} 49 <span class="font-bold">{{ $target }}</span> 50 <span 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 <a href="/{{ $root.RepoInfo.FullName }}/commit/{{ $new }}">{{ slice $new 0 8 }}</a> 55 {{ i "arrow-left" "size-4" }} 56 <a href="/{{ $root.RepoInfo.FullName }}/commit/{{ $old }}">{{ slice $old 0 8 }}</a> 57 </span> 58 {{ else if .Trigger.IsPullRequest }} 59 {{ $sha := deref .Trigger.PRSourceSha }} 60 <span class="inline-flex gap-2 items-center"> 61 <span class="font-bold">{{ $target }}</span> 62 {{ i "arrow-left" "size-4" }} 63 {{ .Trigger.PRSourceBranch }} 64 <span class="text-sm font-mono"> 65 @ 66 <a href="/{{ $root.RepoInfo.FullName }}/commit/{{ $sha }}">{{ slice $sha 0 8 }}</a> 67 </span> 68 </span> 69 {{ end }} 70 </div> 71 72 <div class="text-sm md:text-base col-span-1"> 73 {{ template "repo/pipelines/fragments/pipelineSymbolLong" (dict "Pipeline" . "RepoInfo" $root.RepoInfo) }} 74 </div> 75 76 <div class="text-sm md:text-base col-span-1 text-right"> 77 <time title="{{ .Created | longTimeFmt }}"> 78 {{ .Created | shortTimeFmt }} ago 79 </time> 80 </div> 81 82 {{ $t := .TimeTaken }} 83 <div class="text-sm md:text-base col-span-1 text-right"> 84 {{ if $t }} 85 <time title="{{ $t }}">{{ $t | durationFmt }}</time> 86 {{ else }} 87 <time>--</time> 88 {{ end }} 89 </div> 90 91 <div class="col-span-1 flex justify-end"> 92 {{ if $link }} 93 <a class="md:hidden" href="/{{ $root.RepoInfo.FullName }}/pipelines/{{ .Id }}/workflow/{{ index $workflows 0 }}"> 94 {{ i "arrow-up-right" "size-4" }} 95 </a> 96 <a class="hidden md:inline underline" href="/{{ $root.RepoInfo.FullName }}/pipelines/{{ .Id }}/workflow/{{ index $workflows 0 }}"> 97 view 98 </a> 99 {{ end }} 100 </div> 101 102 </div> 103 {{ end }} 104{{ end }}