Skip to content

Support commit message template functions #160

@Dev25

Description

@Dev25

The current implementation of a commit message template relies on Go's text/template with no extra functions, it would be great to be able to use something like the sprig library which provides a bunch of functions (what Helm uses) or alternatively implement a small amount of functions depending on user demand.

http://masterminds.github.io/sprig/

This then allows users to have more complex logic when generating commits e.g. the following only works when there is 1 deployment, if i have multiple deployments following the same image policy then i need to count the unique strings in .Updated.Images which is not possible with the default text/template functions.

        {{ if eq (len .Updated.Images) 1 -}}
        [skip ci] Auto Release of {{ index .Updated.Images 0 }}
        {{ else -}}
        [skip ci] Auto Release
        {{ end }}

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions