tektoncd / triggers

Event triggering with Tekton!
Apache License 2.0
552 stars 416 forks source link

Add first and last functions. #1636

Closed bigkevmcd closed 1 year ago

bigkevmcd commented 1 year ago

Changes

This adds two new functions to the CEL interceptor functions, first and last which simplifies access JSON array values in CEL expressions.

Submitter Checklist

As the author of this PR, please check off the items in this checklist:

Release Notes

Two new functions for the CEL interceptor, to allow easy access to the first and last elements in an array.
tekton-robot commented 1 year ago

The following is the coverage report on the affected files. Say /test pull-tekton-triggers-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/interceptors/cel/triggers.go 88.5% 89.7% 1.2
tekton-robot commented 1 year ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dibyom

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/tektoncd/triggers/blob/main/OWNERS)~~ [dibyom] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
khrm commented 1 year ago

/kind feature