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
Add cel filter for pull request actions in github example #637
Conversation
|
Hi @ljupchokotev. Thanks for your PR. I'm waiting for a tektoncd member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/ok-to-test |
@savitaashture not sure if I need to do something about the failed check? |
@ljupchokotev could you please run |
c02e74b
to
75c88a6
Compare
@savitaashture done |
@@ -14,6 +14,11 @@ spec: | |||
secretKey: secretToken | |||
eventTypes: | |||
- pull_request | |||
- cel: | |||
filter: >- | |||
body.action == 'opened' || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should be able to do body.action in ['opened', 'synchronize','reopened']
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cleaner, thanks!
The GitHub interceptor doesn't filter the actions for the `pull_request` event type, which means it will trigger when editing a pull requests' description and other similar actions. This commit adds a CEL interceptor in order to filter the pull request actions and only trigger when a pull request is opened, synchronized, or reopened.
75c88a6
to
be37b63
Compare
Excellent, thank you @ljupchokotev !!! /kind documentation |
[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 |
Needed for tektoncd#637 and fixes tektoncd#627 Signed-off-by: Dibyo Mukherjee <dibyo@google.com>
Changes
The GitHub interceptor doesn't filter the actions for the
pull_request
event type, which means it will trigger when editing a pull requests' description and other similar actions.This commit adds a CEL interceptor in order to filter the pull request actions and only trigger when a pull request is opened, synchronized, or reopened.
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.