-
Notifications
You must be signed in to change notification settings - Fork 420
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
Expose the incoming request URL to CEL expressions. #647
Expose the incoming request URL to CEL expressions. #647
Conversation
This adds a `requestURL` key to the CEL expression context. For example, `requestURL.parseURL().path` would get the path of the incoming request URL.
So, this adds /approve |
[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:
Approvers can indicate their approval by writing |
There's arguably value in having the requestURL in trigger bindings, if CEL functions landed in TriggerBindings, I'd be looking to refactor and reuse the same context mechanism. |
Yeah, let's just go with the CEL context for now. |
/lgtm |
I was hoping to parse query parameters using this function to easily trigger a pipeline in tekton (no need for curl or postman etc, just a browser). |
@lostiniceland you can expose the elements you need as overlays via a CEL interceptor and then use those in a binding https://tekton.dev/docs/triggers/interceptors/#cel-interceptors and https://tekton.dev/docs/triggers/triggerbindings/#accessing-data-added-by-interceptorsdocstriggersinterceptors ? |
Changes
This adds a
requestURL
key to the CEL expression context.For example,
requestURL.parseURL().path
would get the path of the incoming request URL.Fixes: #640
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
See the contribution guide for more details.
Release Notes