Event Filters
Filters allow you to control which events are delivered by evaluating conditions against the event's headers and payload body. Filtered events are stored with a filtered status and are not delivered to any destination.
How Filters Work
Filters are configured per endpoint (not per destination). They are evaluated during ingress, before any delivery jobs are created.
Filter Groups
Filters are organized into groups. Each group contains one or more conditions and a logic mode:
- AND — all conditions in the group must match
- OR — at least one condition in the group must match
Group Evaluation
Groups are combined with OR logic: an event passes if any enabled group matches.
If no filter groups are defined for an endpoint, all events pass (no filtering occurs).
Group 1 (AND): condition A AND condition B
Group 2 (OR): condition C OR condition D
Event passes if: (A AND B) OR (C OR D)
Filter Conditions
Each condition evaluates a field from the event against a value using an operator.
Field Paths
| Prefix | Description | Example |
|---|---|---|
header.<name> | Request header (case-insensitive) | header.X-GitHub-Event |
body.<path> | JSON body field (dot-notation) | body.action, body.repository.private |
Nested fields use dot notation: body.pull_request.head.ref
Operators
| Operator | Description | Example |
|---|---|---|
eq | Field equals value | body.action eq "push" |
neq | Field does not equal value | body.action neq "deleted" |
contains | Field contains substring | body.ref contains "main" |
not_contains | Field does not contain substring | body.ref not_contains "test" |
exists | Field exists and is non-empty | header.X-GitHub-Event exists |
not_exists | Field does not exist or is empty | body.draft not_exists |
regex | Field matches regular expression | body.ref regex "refs/heads/(main|develop)" |
Examples
Only accept push events to the main branch
Group (AND):
- header.X-GitHub-Event eq "push"
- body.ref eq "refs/heads/main"
Accept push or pull_request events
Group (OR):
- header.X-GitHub-Event eq "push"
- header.X-GitHub-Event eq "pull_request"
Accept all events except draft PRs
Group (AND):
- header.X-GitHub-Event exists
- body.pull_request.draft neq "true"
Complex: accept pushes to main OR non-draft PRs
Group 1 (AND):
- header.X-GitHub-Event eq "push"
- body.ref eq "refs/heads/main"
Group 2 (AND):
- header.X-GitHub-Event eq "pull_request"
- body.pull_request.draft neq "true"
Event passes if it matches Group 1 OR Group 2.
Filter vs. Destination Event Types
Filters and destination event type lists serve different purposes:
| Feature | Filters | Destination Event Types |
|---|---|---|
| Scope | Per endpoint | Per destination |
| Timing | Before delivery queue | During fan-out |
| Complexity | Field conditions with operators | Simple include list |
| Blocked events | Stored as filtered, visible in event history | Not delivered, no record |
| Use case | Complex conditional logic | Simple event type routing |