{{- /* Render a single label as a GitHub-style pill. Expects a dict context: { "name": "kind:bug", "color": "d73a4a", # without leading # "text_color": "#ffffff", # already with leading # } */ -}} {{- $name := .name -}} {{- $color := .color | default "d0d7de" -}} {{- $text_color := .text_color | default "#1f2328" -}} {{- $extra := "" -}} {{- if eq $name "decided" -}}{{- $extra = " label-decided" -}}{{- end -}} {{- if hasPrefix $name "kind:" -}}{{- $extra = printf "%s label-kind" $extra -}}{{- end -}} {{- if hasPrefix $name "category:" -}}{{- $extra = printf "%s label-category" $extra -}}{{- end -}} {{- if hasPrefix $name "status:" -}}{{- $extra = printf "%s label-status" $extra -}}{{- end -}} {{ $name }}