{{ define "title" }}pipelines · {{ .RepoInfo.FullName }}{{ end }} {{ define "extrameta" }} {{ $title := "pipelines"}} {{ $url := printf "https://tangled.org/%s/pipelines" .RepoInfo.FullName }} {{ template "repo/fragments/og" (dict "RepoInfo" .RepoInfo "Title" $title "Url" $url) }} {{ end }} {{ define "repoContent" }}
{{ range .Pipelines }} {{ block "pipeline" (list $ .) }} {{ end }} {{ else }}

No pipelines run for this repository.

{{ end }}
{{ end }} {{ define "pipeline" }} {{ $root := index . 0 }} {{ $p := index . 1 }}
{{ block "pipelineHeader" $ }} {{ end }}
{{ end }} {{ define "pipelineHeader" }} {{ $root := index . 0 }} {{ $p := index . 1 }} {{ with $p }}
{{ .Trigger.Kind.String }}
{{ $target := .Trigger.TargetRef }} {{ $workflows := .Workflows }} {{ $link := "" }} {{ if .IsResponding }} {{ $link = printf "/%s/pipelines/%s/workflow/%d" $root.RepoInfo.FullName .Id (index $workflows 0) }} {{ end }} {{ if .Trigger.IsPush }} {{ $target }} {{ else if .Trigger.IsPullRequest }} {{ $sha := deref .Trigger.PRSourceSha }} {{ $target }} {{ i "arrow-left" "size-4" }} {{ .Trigger.PRSourceBranch }} @ {{ slice $sha 0 8 }} {{ end }}
{{ template "repo/pipelines/fragments/pipelineSymbolLong" (dict "Pipeline" . "RepoInfo" $root.RepoInfo) }}
{{ template "repo/fragments/shortTimeAgo" .Created }}
{{ $t := .TimeTaken }}
{{ if $t }} {{ else }} {{ end }}
{{ if $link }} {{ i "arrow-up-right" "size-4" }} {{ end }}
{{ end }} {{ end }}