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.org/%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 <div class="py-6 w-fit flex flex-col gap-4 mx-auto"> 16 <p> 17 No pipelines have been run for this repository yet. To get started: 18 </p> 19 {{ $bullet := "mx-2 text-xs bg-gray-200 dark:bg-gray-600 rounded-full size-5 flex items-center justify-center font-mono inline-flex align-middle" }} 20 <p> 21 <span class="{{ $bullet }}">1</span>First, choose a spindle in your 22 <a href="/{{ .RepoInfo.FullName }}/settings?tab=pipelines" class="underline">project settings</a>. 23 </p> 24 <p> 25 <span class="{{ $bullet }}">2</span>For self-hosting a spindle you can learn more 26 <a href="https://tangled.org/@tangled.org/core/blob/master/docs/spindle/hosting.md" class="underline">here</a>. 27 </p> 28 <p> 29 <span class="{{ $bullet }}">3</span>Configure your first 30 <a href="https://tangled.org/@tangled.org/core/blob/master/docs/spindle/pipeline.md" class="underline">Spindle workflow</a>. 31 </p> 32 <p> 33 <span class="{{ $bullet }}">4</span>Push! 34 </p> 35 </div> 36 {{ end }} 37 </div> 38</div> 39{{ end }} 40 41 42{{ define "pipeline" }} 43 {{ $root := index . 0 }} 44 {{ $p := index . 1 }} 45 <div class="py-2 bg-white dark:bg-gray-800 dark:text-white"> 46 {{ block "pipelineHeader" $ }} {{ end }} 47 </div> 48{{ end }} 49 50{{ define "pipelineHeader" }} 51 {{ $root := index . 0 }} 52 {{ $p := index . 1 }} 53 {{ with $p }} 54 <div class="grid grid-cols-6 md:grid-cols-12 gap-2 items-center w-full"> 55 <div class="text-sm md:text-base col-span-1"> 56 {{ .Trigger.Kind.String }} 57 </div> 58 59 <div class="col-span-2 md:col-span-7 flex items-center gap-4"> 60 {{ $target := .Trigger.TargetRef }} 61 {{ $workflows := .Workflows }} 62 {{ $link := "" }} 63 {{ if .IsResponding }} 64 {{ $link = printf "/%s/pipelines/%s/workflow/%d" $root.RepoInfo.FullName .Id (index $workflows 0) }} 65 {{ end }} 66 {{ if .Trigger.IsPush }} 67 <span class="font-bold">{{ $target }}</span> 68 <span class="hidden md:inline-flex gap-2 items-center font-mono text-sm"> 69 {{ $old := deref .Trigger.PushOldSha }} 70 {{ $new := deref .Trigger.PushNewSha }} 71 72 <a href="/{{ $root.RepoInfo.FullName }}/commit/{{ $new }}">{{ slice $new 0 8 }}</a> 73 {{ i "arrow-left" "size-4" }} 74 <a href="/{{ $root.RepoInfo.FullName }}/commit/{{ $old }}">{{ slice $old 0 8 }}</a> 75 </span> 76 {{ else if .Trigger.IsPullRequest }} 77 {{ $sha := deref .Trigger.PRSourceSha }} 78 <span class="inline-flex gap-2 items-center"> 79 <span class="font-bold">{{ $target }}</span> 80 {{ i "arrow-left" "size-4" }} 81 {{ .Trigger.PRSourceBranch }} 82 <span class="text-sm font-mono"> 83 @ 84 <a href="/{{ $root.RepoInfo.FullName }}/commit/{{ $sha }}">{{ slice $sha 0 8 }}</a> 85 </span> 86 </span> 87 {{ end }} 88 </div> 89 90 <div class="text-sm md:text-base col-span-1"> 91 {{ template "repo/pipelines/fragments/pipelineSymbolLong" (dict "Pipeline" . "RepoInfo" $root.RepoInfo) }} 92 </div> 93 94 <div class="text-sm md:text-base col-span-1 text-right"> 95 {{ template "repo/fragments/shortTimeAgo" .Created }} 96 </div> 97 98 {{ $t := .TimeTaken }} 99 <div class="text-sm md:text-base col-span-1 text-right"> 100 {{ if $t }} 101 <time title="{{ $t }}">{{ $t | durationFmt }}</time> 102 {{ else }} 103 <time>--</time> 104 {{ end }} 105 </div> 106 107 <div class="col-span-1 flex justify-end"> 108 {{ if $link }} 109 <a class="md:hidden" href="/{{ $root.RepoInfo.FullName }}/pipelines/{{ .Id }}/workflow/{{ index $workflows 0 }}"> 110 {{ i "arrow-up-right" "size-4" }} 111 </a> 112 <a class="hidden md:inline underline" href="/{{ $root.RepoInfo.FullName }}/pipelines/{{ .Id }}/workflow/{{ index $workflows 0 }}"> 113 view 114 </a> 115 {{ end }} 116 </div> 117 118 </div> 119 {{ end }} 120{{ end }}