List functions?
#1010
Replies: 1 comment 2 replies
-
Hi, I'd be totally happy to accept |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've implemented a couple of functions in projects that use CEL the easiest to link to is in Tekton Triggers:
https://github.com/tektoncd/triggers/blob/b133ef7b0d689c78a342879411a78c74b89de1f5/pkg/interceptors/cel/triggers.go#L202-L207
These are
.first()
and.last()
which return the first and (unsurprisingly) last elements of a list.This is useful when you want to split a string and take the first (or last) element in that list in a single expression, without having to resplit and calculate the length.
Would these be useful to add to the list extension?
I'm happy to do the work for this.
Beta Was this translation helpful? Give feedback.
All reactions