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

feature: add sprig functions to templete.FuncMap #73

Closed
jacobsin opened this issue May 11, 2020 · 1 comment
Closed

feature: add sprig functions to templete.FuncMap #73

jacobsin opened this issue May 11, 2020 · 1 comment
Labels
type: enhancement New enhancement

Comments

@jacobsin
Copy link

fmap @ chglog.go:307 could add sprig functions in to allow more per-repo changelog template customization on the user end without code changes.

E.g. dict, get and set would allow me dedup commit lines sharing the same #issue

Expected Behavior

In CHANGELOG.tpl.md I should be able to create new dict like

{{ $commitsByIssue := dict }}
{{ if not get $commitsByIssues .Refs[0].Ref }}
...
{{ set $commitsByIssues . }}
{{ end }}

Actual Behavior

panic: template: CHANGELOG.tpl.md:17 function "dict" not defined

Steps to Reproduce (including precondition)

  1. Add the above gotemplate snippet ln 20-21 and 24-25 to .chglog/CHANGELOG.tpl.md
  2. Run git-chglog

Your Environment

  • OS: RHEL7
  • git-chglog version: 0.9.1
@clok
Copy link
Collaborator

clok commented Mar 29, 2021

Sprig has been included as a part of the v0.14.0 release. See #131 🎉

@clok clok closed this as completed Mar 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement New enhancement
Projects
None yet
2 participants