{{ define "title" }} tags · {{ .RepoInfo.FullName }} {{ end }} {{ define "repoContent" }}

tags

{{ range .Tags }}
{{ i "tag" "w-4 h-4" }} {{ .Name }}
{{ if .Tag }} {{ slice .Tag.Target.String 0 8 }} {{ .Tag.Tagger.Name }} {{ end }}
{{ if .Tag }} {{ $messageParts := splitN .Tag.Message "\n\n" 2 }}

{{ index $messageParts 0 }}

{{ if gt (len $messageParts) 1 }}

{{ nl2br (index $messageParts 1) }}

{{ end }} {{ block "artifacts" (list $ .) }} {{ end }} {{ else }}

no message

{{ end }}
{{ else }}

This repository does not contain any tags.

{{ end }}
{{ end }} {{ define "repoAfter" }} {{ if gt (len .DanglingArtifacts) 0 }}
{{ block "dangling" . }} {{ end }}
{{ end }} {{ end }} {{ define "artifacts" }} {{ $root := index . 0 }} {{ $tag := index . 1 }} {{ $isPushAllowed := $root.RepoInfo.Roles.IsPushAllowed }} {{ $artifacts := index $root.ArtifactMap $tag.Tag.Hash }} {{ if or (gt (len $artifacts) 0) $isPushAllowed }}

artifacts

{{ range $artifact := $artifacts }} {{ $args := dict "LoggedInUser" $root.LoggedInUser "RepoInfo" $root.RepoInfo "Artifact" $artifact }} {{ template "repo/fragments/artifact" $args }} {{ end }} {{ if $isPushAllowed }} {{ block "uploadArtifact" (list $root $tag) }} {{ end }} {{ end }}
{{ end }} {{ end }} {{ define "uploadArtifact" }} {{ $root := index . 0 }} {{ $tag := index . 1 }} {{ $unique := $tag.Tag.Target.String }}
{{ end }} {{ define "dangling" }} {{ $root := . }} {{ $isPushAllowed := $root.RepoInfo.Roles.IsPushAllowed }} {{ $artifacts := $root.DanglingArtifacts }} {{ if and (gt (len $artifacts) 0) $isPushAllowed }}

dangling artifacts

The tags that these artifacts were attached to have been deleted. These artifacts are only visible to collaborators.

{{ range $artifact := $artifacts }} {{ $args := dict "LoggedInUser" $root.LoggedInUser "RepoInfo" $root.RepoInfo "Artifact" $artifact }} {{ template "repo/fragments/artifact" $args }} {{ end }}
{{ end }} {{ end }}