branches

PullApprove runs when a CODEREVIEW.toml is found in the branch's base commit. The configuration is always pulled from the base branch, which means a PR can't modify the requirements for its own review.

There may be branches where the CODEREVIEW.toml is present, but you don't want PullApprove to run (usually because it will run later in a subsequent PR). The top-level branches setting can be used to define when PullApprove runs.

branches = ["main", "develop"]

Branch names are evaluated using fnmatch syntax, and can also use git-style range syntax to specify both head and base branches.

branches = [
    "main",  # base only
    "release/*",  # base with pattern
    "feature/*..develop",  # base and head
    "..develop",  # head only
]

Advanced branch patterns

Range syntax with .. and ...

PullApprove supports two types of range syntax for matching branch combinations:

Two-dot syntax (..)

The .. syntax matches pull requests where the base branch matches the left pattern and the head branch matches the right pattern.

branches = [
    "feature/*..develop",     # feature branches → develop
    "hotfix/*..main",         # hotfix branches → main  
    "release/*..main",        # release branches → main
]

Three-dot syntax (...)

The ... syntax works the same as .. - it matches base and head branch patterns.

branches = [
    "feature/*...develop",    # equivalent to feature/*..develop
    "hotfix/*...main",        # equivalent to hotfix/*..main
]

Head-only and base-only patterns

You can match only the head or base branch by omitting one side of the range:

branches = [
    "..develop",              # any branch → develop
    "main..",                 # main → any branch
    "feature/*..",            # feature/* → any branch
]

Pattern matching examples

branches = [
    # Simple base branch matching
    "main",
    "develop", 
    "release/*",
    
    # Feature branch workflow
    "feature/*..develop",     # features merge to develop
    "develop..main",          # develop merges to main
    "hotfix/*..main",         # hotfixes merge to main
    
    # Release workflow  
    "release/*..main",        # releases merge to main
    "release/*..develop",     # releases also merge back to develop
    
    # Head-only patterns
    "..main",                 # any branch merging to main
    "..develop",              # any branch merging to develop
]

Complex workflow example

For a GitFlow-style workflow:

branches = [
    # Development
    "feature/*..develop",
    "bugfix/*..develop", 
    
    # Releases
    "develop..main",
    "release/*..main",
    "release/*..develop",
    
    # Hotfixes
    "hotfix/*..main",
    "hotfix/*..develop",
]