Trigger Rules
Trigger rules are evaluated after authentication but before execution. A webhook that fails any rule is logged as filtered and never runs.
Payload Filters
Match specific payload fields:
[[hooks.trigger_rules.payload_filters]]
field = "action"
operator = "equals"
value = "opened"
Operators
| Operator | Description |
|---|---|
equals | Exact string match |
not_equals | Not equal |
contains | Substring match |
regex | Regular expression match |
exists | Field is present (any value) |
gt | Greater than (numeric) |
lt | Less than (numeric) |
gte | Greater than or equal |
lte | Less than or equal |
Nested fields
Use dot notation for nested values:
[[hooks.trigger_rules.payload_filters]]
field = "pull_request.base.ref"
operator = "regex"
value = "^(main|release/.*)"
Multiple payload filters use AND logic — all must match.
Time Windows
Restrict execution to specific days and hours (UTC):
[[hooks.trigger_rules.time_windows]]
days = ["Mon", "Tue", "Wed", "Thu", "Fri"]
start_time = "09:00"
end_time = "17:00"
Multiple time windows use OR logic — any matching window allows execution.
Cooldown
Enforce a minimum interval between executions:
[hooks.trigger_rules]
cooldown = "5m"
If a hook was executed less than 5 minutes ago, the new request is filtered.
Rate Limiting
Token-bucket rate limiting per hook:
[hooks.trigger_rules.rate_limit]
max_requests = 10
window = "1m"
Exceeding the limit returns 429 Too Many Requests.