Rules evaluate against normalized payloads and raw webhook JSON. Githook injects event and provider at the root of the payload for consistent routing.
event is the provider event name (for example, GitHub push, GitLab merge_request, Bitbucket repo:push).
Matching behavior
- Missing fields evaluate as false
- Boolean operators:
&&,||,! - String and numeric comparisons are supported
- Bare identifiers map to root JSONPath (for example,
action→$.action)
Examples
when: action == "closed" && pull_request.merged == true emit: pr.merged
when: event == "push" && ref == "refs/heads/dev" emit: github.push.dev
when: contains(pull_request.title, "[WIP]") == false emit: pr.ready
JSONPath helpers
Use JSONPath for nested fields:
when: repository.owner.login == "acme" && like(ref, "refs/heads/%") emit: repo.acme.push
If you are unsure of the payload shape, open the Event Logs entry and inspect the normalized payload before writing the rule.