Using "title" in jiralert.tmpl fails with wrong type for value; expected language.Tag; got string
Opened this issue · 0 comments
christianjedroCDT commented
I´m currently trying to use title
in the template but this fails with:
template: jiralert.tmpl:3:51: executing "jira.component" at <.GroupLabels.component>: wrong type for value; expected language.Tag; got string"
jiralert.tmpl
{{ define "jira.component" }}{{- .GroupLabels.component | title }}{{ end }}
jiralert.yml
template: jiralert.tmpl
defaults:
api_url: https://xxx.atlassian.net
description: "test"
issue_type: Alert
password: ""
reopen_duration: 1h
reopen_state: Reopening
summary: "test"
user: ""
wont_fix_resolution: Won't Do
receivers:
- name: 'jiralert-critical'
project: 'OPS'
add_group_labels: false
priority: High
fields:
# Components
components:
- name: '{{ template "jira.component" . }}'
Am i missing something - looking at this line of code this should work, shouldn´t it?