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.
- 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 runon a PR or MR, Oplane reviews it regardless of your filters.
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
- Open the workspace connected to the repository.
- 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.
- Under Trigger filters, click Filter.
- Under Filter on, pick Target branch, Source branch, or Path.
- Under Pattern, enter one pattern per line.
- Click Add filter.
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.
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, somainalso matches a branch calledfeature/main, anddocs/matchesapi/docs/. Start the pattern with/to match from the top only, for example/main. *doesn’t cross a/.release/*matchesrelease/2026.10but notrelease/2026/10. Use**to match across several levels.- Patterns are case-sensitive.
Maindoesn’t matchmain. - 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
Only review PRs into main and release branches
Only review PRs into main and release branches
Filter on: Target branchThe
/ at the start of /main stops it from matching branches such as feature/main.Skip dependency update branches
Skip dependency update branches
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.Skip documentation-only changes
Skip documentation-only changes
Filter on: PathA 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.Review one service in a monorepo
Review one service in a monorepo
Filter on: PathOplane reviews PRs that change the payments service or the shared authentication library. PRs that only change other services aren’t reviewed.
Review a folder except its tests
Review a folder except its tests
Filter on: PathChanges 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.
Read next
- How reviews work, for what triggers a review and what it produces.
- Review pull and merge requests, to set up reviews and act on the comment.
- Limits, for the other limits on reviews.