Log in to v3
YAML
Supported on GitHub GitLab Bitbucket

PullApprove Conditions

This setting is deprecated in favor of overrides.

Write expressions to decide which PRs get reviewed and when the review starts.

By default there are no pullapprove_conditions and every PR is eligible for review according to your groups.

When you use pullapprove_conditions to disable review, by default you will see a "success" status in GitHub.

version: 3
pullapprove_conditions:
- "'WIP' not in title"  # only review if not marked as work in progress
- "base.ref == 'master'"  # only review things being merged into master
- "'*travis*' in statuses.successful"  # only review if tests have already passed
- "'hotfix' not in labels"  # let hotfix PRs go through without review

# review groups are only evaluated if all of the pullapprove_conditions are true
groups:
  ...

Success status from pullapprove when conditions are not met

Blocking PRs

Depending on your condition, you may want to set the status to "pending" or "failure" when a condition is unmet. If PullApprove is a required status check on your repo, this will block a PR from being merged.

You can also write a custom explanation to provide more information directly in the GitHub interface.

Note that the conditions are evaluated in order, and the first one to fail will set the status and explanation.

version: 3
pullapprove_conditions:
- condition: "base.ref == 'master'"
  unmet_status: success
  explanation: "Review not required unless merging to master"
- "'hotfix' not in labels"  # when using the string type, the default status is "success"
- condition: "'WIP' not in title"
  unmet_status: pending
  explanation: "Work in progress"
- condition: "'*travis*' in statuses.successful"
  unmet_status: failure
  explanation: "Tests must pass before review starts"

# review groups are only evaluated if all of the pullapprove_conditions are true
groups:
  ...

Pending status for WIP pull request from pullapprove when conditions are not met