{{- $contributors := .contributors -}} {{- $prNumbers := .pr_numbers -}} {{- if or (gt (len $contributors) 0) (gt (len $prNumbers) 0) }}
{{- if gt (len $contributors) 0 }} {{- printf "Thanks to " -}} {{- range $i, $contributor := $contributors }} {{- $username := replace $contributor "@" "" }} {{- $profile := printf "https://github.com/%s" $username }} {{- if gt $i 0 }}{{ printf ", " }}{{ end -}} {{ $username }} {{- end }} {{- if gt (len $prNumbers) 0 }}{{ printf " for contributing %s " (cond (eq (len $prNumbers) 1) "PR" "PRs") }}{{ else }}{{ printf " for contributing this change!" }}{{ end -}} {{- else }} {{- printf "%s " (cond (eq (len $prNumbers) 1) "PR" "PRs") -}} {{- end }} {{- range $i, $prNumber := $prNumbers }} {{- if gt $i 0 }}{{ printf ", " }}{{ end -}} {{- $prLink := printf "https://github.com/vectordotdev/vector/pull/%v" $prNumber -}} #{{ $prNumber }} {{- end -}} {{- if gt (len $prNumbers) 0 }}!{{ end -}}
{{- end }}