Skip to main content
Trigger filters decide which pull requests (GitHub) and merge requests (GitLab) Oplane reviews automatically. You can filter on the target branch, the source branch, or the paths of changed files. This page explains how filters and their patterns work, with examples. For what triggers a review in the first place, see How reviews work.
You need to be the workspace Owner or an Org Admin to change trigger filters. See Workspace permissions.

How trigger filters work

Without trigger filters, Oplane reviews every PR or MR in the repository. When you add a filter, Oplane only reviews a PR or MR automatically when a filter matches it. You can filter on:
  • Target branch: the branch the PR or MR merges into.
  • Source branch: the branch the changes come from.
  • Path: the paths of the files the PR or MR changes. The filter matches when any changed file matches, so a PR that changes one matching file and many other files is still reviewed.
How filters behave:
  • Each repository has its own filters. You set them per linked repository in a workspace.
  • Filters are combined with a logical OR. Oplane reviews a PR or MR when any one filter matches. It doesn’t need all of them to match.
  • Filters only affect automatic reviews. If you comment oplane review, @oplane review, oplane run, or @oplane run on a PR or MR, Oplane reviews it regardless of your filters.
Because filters are combined with OR, you can’t use two filters to narrow each other down. For example, a Target branch filter /main and a Path filter services/payments/** review every PR into main and every PR that touches services/payments/. To review fewer PRs, make a single filter more specific.

Add a trigger filter

  1. Open the workspace connected to the repository.
  2. Go to workspace settings and find the linked repository. Make sure Enable PR analysis (or Enable MR analysis for GitLab) is on. Trigger filters only appear while analysis is on.
  3. Under Trigger filters, click Filter.
  4. Under Filter on, pick Target branch, Source branch, or Path.
  5. Under Pattern, enter one pattern per line.
  6. Click Add filter.
To change a filter, click its edit icon. To remove it, click its delete icon. When no filters are active, the section says that every PR or MR is reviewed.

Writing patterns

Each line of a filter is a pattern that says what Oplane reviews. A line that starts with ! is an exclusion: it takes back something a line above it included.
Start with what to include. A filter that only contains exclusions (lines that start with !) matches nothing, so Oplane stops reviewing PRs or MRs automatically. To review everything except some paths or branches, put ** on the first line, then add your exclusions below it.
Oplane reads the lines from top to bottom, and the last line that matches decides. Order matters: In the second pattern, release/** comes last and includes release/legacy again.

Pattern syntax

Some rules that often catch people out:
  • A pattern without a /, or with only a / at the end, matches at any level. This applies to branch names too, so main also matches a branch called feature/main, and docs/ matches api/docs/. Start the pattern with / to match from the top only, for example /main.
  • * doesn’t cross a /. release/* matches release/2026.10 but not release/2026/10. Use ** to match across several levels.
  • Patterns are case-sensitive. Main doesn’t match main.
  • Lines that start with # are comments. Oplane ignores them and blank lines.
  • To review everything, delete the filter. Reviewing every PR or MR is the default.

Examples

Filter on: Target branch
The / at the start of /main stops it from matching branches such as feature/main.
Filter on: Source branch
** includes every branch, then the two exclusions remove the branches that dependency bots create. Without the first line, nothing would be reviewed.
Filter on: Path
A PR that only changes files under docs/ or Markdown files isn’t reviewed. A PR that also changes code is reviewed, because a path filter matches when any changed file matches.
Filter on: Path
Oplane reviews PRs that change the payments service or the shared authentication library. PRs that only change other services aren’t reviewed.
Filter on: Path
Changes under src/ are reviewed, except files in any test folder. A PR that only changes tests isn’t reviewed.

Renamed files and very large changes

When a file is renamed or moved, a path filter checks both the old and the new path. If a PR or MR changes so many files that Oplane can’t get the full list from GitHub or GitLab, Oplane reviews it rather than risk skipping a change that matches.

Limits

If a filter breaks a limit, Oplane shows an error that explains what to fix and doesn’t save the filter.