<!--
Sitemap:
- [Installation](/installation)
- [Upgrading](/upgrading): Version-specific steps for upgrading an existing Bento install.
- [Concepts](/concepts)
- [Build your first pipeline](/tutorials/pipeline-args)
- [Target a specific issue or PR from a URL](/tutorials/url-targeting)
- [Keep state across runs](/tutorials/pipeline-state)
- [Fire a pipeline on a schedule or on demand](/tutorials/schedule-and-fire)
- [Configuration](/configuration)
- [Knowledge Base](/knowledge-base/)
- [Method & delivery](/knowledge-base/modes)
- [Config](/knowledge-base/config)
- [MCP](/knowledge-base/mcp)
- [Pipeline configuration reference](/pipelines/config)
- [Filters](/pipelines/filters)
- [Triggers](/triggers/)
- [GitHub Trigger](/triggers/github)
- [Linear Trigger](/triggers/linear)
- [Webhook](/triggers/webhook)
- [Schedule Trigger](/triggers/schedule)
- [Manual Trigger](/triggers/manual)
- [Traces](/pipelines/traces)
- [Slack](/integrations/slack)
- [Public Access](/public-access)
- [Context Engineering](/context-engineering)
- [Best Practices](/best-practices)
- [Troubleshooting](/troubleshooting)
- [Architecture](/architecture/vision)
- [Workspaces](/workspaces)
- [Authentication](/authentication)
- [Identity](/identity)
- [Security](/security)
- [References](/references)
- [Changelog](/changelog): Bento release history.
- [CLI Reference](/cli/)
- [Setup](/cli/setup)
- [Lifecycle](/cli/lifecycle)
- [Sandbox Image](/cli/image)
- [Observability](/cli/observability)
- [Diagnostics](/cli/diagnostics)
- [Triggers](/cli/triggers)
- [Workbench](/cli/workbench)
- [Auth](/cli/auth)
- [Knowledge](/cli/knowledge)
- [Bento](/index)
- [Runtime Wrapper](/architecture/runtime-wrapper)
- [Skill Evolve](/architecture/skill-evolve)
-->

# Filters

All event-based triggers (`github`, `linear`, `webhook`) support a `filter:` block. Filters let multiple pipelines subscribe to the same event type with different criteria — only the pipelines whose filters pass are enqueued.

All conditions in a `filter:` block are AND-ed: every condition must pass for the pipeline to fire.

## `filter.repos`

Allow-list of GitHub `repository.full_name` values. Events from repos not in the list are dropped.

```yaml
filter:
  repos: [acme/frontend, acme/backend]
```

Only applies to `github` triggers.

## `filter.when`

Equality checks against nested payload paths; all entries must match.

```yaml
filter:
  when:
    review.state: approved
    pull_request.user.login: my-bot   # PR must be authored by the bot
```

Paths use dot notation to traverse nested JSON. The check is strict equality (`===`).

## `filter.not`

Equality checks against nested payload paths. The event is dropped if any entry matches. Useful for preventing the bot from reacting to its own events.

```yaml
filter:
  not:
    review.user.login: my-bot         # ignore reviews submitted by the bot
    comment.user.login: my-bot        # ignore comments from the bot
```

## `filter.mentioned`

Checks whether the daemon's configured GitHub login appears as an `@mention` in the event's text body (comment body, review body, etc.).

```yaml
filter:
  mentioned: true    # fire only when @-mentioned
  # or
  mentioned: false   # fire on all events
```

Two pipelines on the same event type can split by mention status — one observes, one acts:

```yaml
# pr-review-comment.yaml — observe all inline comments
trigger:
  github: [pull_request_review_comment.created]
  filter:
    not: { comment.user.login: my-bot }
    mentioned: false
agent: reviewer
skill: pr-comment-review

# pr-review-comment-mentioned.yaml — act when @-mentioned
trigger:
  github: [pull_request_review_comment.created]
  filter:
    mentioned: true
agent: editor
skill: pr-comment-act
```

## `filter.assignee`

Checks `payload.assignee.login`. The special value `bot` resolves to the daemon's configured GitHub login.

```yaml
filter:
  assignee: bot     # only fire when the event is assigned to the bot
```

## Example: combined filter

All conditions in the block must pass simultaneously. This example fires only for approved reviews on bot-authored PRs, submitted by a human (not the bot itself):

```yaml
trigger:
  github:
    - pull_request_review.submitted
  filter:
    when:
      review.state: approved
      pull_request.user.login: my-bot
    not:
      review.user.login: my-bot
```
