Skip to content

Commit

Permalink
Merge branch 'master' into feature-sensor-email-trigger, Adding changes
Browse files Browse the repository at this point in the history
from feat: add all sprig functions to templates (#2768)
  • Loading branch information
gokulav137 committed Sep 9, 2023
2 parents 1608b5a + ccfda47 commit 4e85cd9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
codegen:
name: Codegen
runs-on: ubuntu-latest
timeout-minutes: 5
timeout-minutes: 7
steps:
- name: Checkout code
uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion sensors/dependencies/filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ filterData:
}

if f.Template != "" {
tpl, tplErr := template.New("param").Funcs(sprig.HermeticTxtFuncMap()).Parse(f.Template)
tpl, tplErr := template.New("param").Funcs(sprig.FuncMap()).Parse(f.Template)
if tplErr != nil {
if operator == v1alpha1.OrLogicalOperator {
errMessages = append(errMessages, tplErr.Error())
Expand Down
2 changes: 1 addition & 1 deletion sensors/triggers/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ func ResolveParamValue(src *v1alpha1.TriggerParameterSource, events map[string]*
// the raw json bytes and then returns the result or any error
func getValueWithTemplate(value []byte, templString string) (string, error) {
res := gjson.ParseBytes(value)
tpl, err := template.New("param").Funcs(sprig.HermeticTxtFuncMap()).Parse(templString)
tpl, err := template.New("param").Funcs(sprig.FuncMap()).Parse(templString)
if err != nil {
return "", err
}
Expand Down

0 comments on commit 4e85cd9

Please sign in to comment.