Skip to main content

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

PrefixDescriptionExample
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

OperatorDescriptionExample
eqField equals valuebody.action eq "push"
neqField does not equal valuebody.action neq "deleted"
containsField contains substringbody.ref contains "main"
not_containsField does not contain substringbody.ref not_contains "test"
existsField exists and is non-emptyheader.X-GitHub-Event exists
not_existsField does not exist or is emptybody.draft not_exists
regexField matches regular expressionbody.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:

FeatureFiltersDestination Event Types
ScopePer endpointPer destination
TimingBefore delivery queueDuring fan-out
ComplexityField conditions with operatorsSimple include list
Blocked eventsStored as filtered, visible in event historyNot delivered, no record
Use caseComplex conditional logicSimple event type routing