GuidesCode ReviewAdvanced configsDirectory-level config

Overview

Apply custom code review settings to specific folders in your repository. Ideal for monorepos where different areas have different standards or ownership.

Mesrai selects a single config per PR: DirectoryRepositoryGlobal

Learn how settings flow between levels in Config Inheritance & Overrides.

How it works

  • Configure any folder at any depth (e.g., api/src/services)
  • Configure as many folders as you want
  • No overlapping: if you configure api/src/services, you cannot also configure api/src/services/users

Selection rules

  • One configured directory touched: Uses that directory’s config
  • No configured directories touched: Uses repository config (or global if no repo config)
  • Two or more configured directories touched: Escalates to repository config (or global if no repo config)

Mesrai uses one config per PR to keep reviews predictable. Mixing configs causes conflicts.

Examples

You configured src/microservice-alpha. PR changes files in src/microservice-alpha and unconfigured folders.

Uses microservice-alpha config.

Setup

  1. Open your repository’s Code Review settings
  2. Add directory entries and assign configurations
  3. Save changes

If you also use mesrai-config.yml, it overrides web settings (see Config Priority in General settings).