Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using "title" in jiralert.tmpl fails with wrong type for value; expected language.Tag; got string #186

Open
christianjedroCDT opened this issue Mar 19, 2024 · 0 comments

Comments

@christianjedroCDT
Copy link

christianjedroCDT commented Mar 19, 2024

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant