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

OperatorDescription
equalsExact string match
not_equalsNot equal
containsSubstring match
regexRegular expression match
existsField is present (any value)
gtGreater than (numeric)
ltLess than (numeric)
gteGreater than or equal
lteLess 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.