Advanced Review Settings

About Advanced Settings rules

PullRequest makes it easy to automate which pull or merge requests are sent to our network by default, which are restricted, and which are canceled if a certain state is detected.

These configuration rules can be applied to the Organization-level (all connected repositories) and for specific repositories.

Examples:

  • Automatically send to PullRequest if the author matches "JohnDoe"

  • Automatically cancel PullRequest review if a commit message contains "final"

  • Don't send to PullRequest if the base branch matches "main"

These settings are evaluated in a configurable, descending order.

How to configure Advanced Review Settings rules

For all repositories in your Organization

With your Organization selected, click Settings -> Review Settings -> Advanced Settings

For a specific repository in your Organization

Select a Project -> Project Settings -> Advanced Settings

For transparency, any rules applied to the Organization-level will be visible here so it's easier to view the full evaluation criteria. Though visible, Organization-level rules cannot be edited here.

Adding an evaluation criteria rule

Clicking the Add rule or Add another rule will render a prompt where you can add evaluation criteria.

See Supported rules below for details on each available option.

Default Behavior

If none of the criteria defined by the rules are met, whether or not a pull or merge request is sent to the network to be reviewed will depend on the basic Review Settings.

If configured to Automatically send pull requests to the network, it will be sent to the network to be reviewed by default. This is the best approach if you wish to have most of your pull or merge requests reviewed by our engineers with a few exceptions.

If configured to I'll manually select individual pull requests, it will not be sent to the PullRequest network by default. This is the best approach if you wish to have most of your pull or merge requests withheld from being reviewed by our engineers, but in some circumstances, you'll always want them reviewed if they match a predictable condition.

Manual Override

You can always override these settings by canceling or sending a review to the network manually from the PullRequest dashboard.

Supported rules

Field

Comparators

Example

Title

matches

does not match

contains

does not contain

Automatically send to PullRequest if the title contains "JIRA"

Description

matches

does not match

contains

does not contain

Don't send to PullRequest if the description contains "no review needed

Head branch

matches

does not match

contains

does not contain

Automatically send to PullRequest if the head branch contains "feature"

Base branch

matches

does not match

contains

does not contain

Don't send to PullRequest if the base branch matches "main"

Author name

matches

does not match

contains

does not contain

Automatically send to PullRequest if the author name matches "JohnDoe"

Is a draft [1]

= true

= false

Don't send to PullRequest if the pull request is a draft

Created

after MM/DD/YYYY HH: MM AM/PM

before MM/DD/YYYY HH: MM AM/PM

Don't send to PullRequest if the review was created before 2020-01-01 12:00

Commit message

matches

does not match

contains

does not contain

Automatically send to PullRequest if the commit message does not contain "work in progress"

Commit author name

matches

does not match

contains

does not contain

Don't send to PullRequest if the commit author name matches "JohnDoe"

Comment message

matches

does not match

contains

does not contain

Automatically send to PullRequest if the commit message contains "needs review"

Comment author name

matches

does not match

contains

does not contain

Don't send to PullRequest if the comment author name matches "JohnDoe"

Summary comment message

matches

does not match

contains

does not contain

Automatically send to PullRequest if the summary commant message contains "Needs PullRequest review"

Summary comment author name

matches

does not match

contains

does not contain

Automatically send to PullRequest if the summary comment author name matches "JohnDoe"

Diff line count

=

>

<

≤ ≥

Don't send to PullRequest if the diff line count is less than 10.

Any diff file path

matches

does not match

contains

does not contain

Don't send to PullRequest if any diff file path contains "legacy"

All diff file paths

matches

does not match

contains

does not contain

Don't send to PullRequest if all diff file path contains "legacy"

Percentage of commits already reviewed

=

>

<

≤ ≥

Don't send to PullRequest if the percentage of commits already reviewed is greater than 90

Review cost for the month [2]

=

>

<

≤ ≥

Don't send to PullRequest if review costs for the month have exceeded your specified budget

[1] - The "Is draft" field is only applicable for source control services that provide "Draft" features such as GitHub's Drafts.

[2] - The "Review cost for the month" field is only applicable for teams with usage-based billing. This field does not apply for teams billed on a per-seat subscription basis.