# Advanced Review Settings

## About Advanced Settings rules

HackerOne 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**

![](/files/-MIts_RSVe6HxyonT5ni)

### **For a specific repository in your Organization**

Select a **Project** -> **Project Settings** -> **Advanced Settings**

{% hint style="info" %}
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.
{% endhint %}

![](/files/-MIttNTgIY9akZI04PeB)

### 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**](https://docs.pullrequest.com/pullrequest-docs/code-review-settings/advanced-review-settings#supported-rules) below for details on each available option.

![](/files/-MItula-3RKzzXR7VO9k)

## 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 HackerOne Code 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 circumstance&#x73;**,** you'll always want them reviewed if they match a predictable condition.

![](/files/-MItizv0eibyd9ruozmo)

### Manual Override

You can always override these settings by canceling or [**sending**](https://docs.pullrequest.com/pullrequest-docs/assign-code-review-to-pull-request-network/assigning-github-code-reviews#step-3) a review to the network manually from the HackerOne Code dashboard.

## Supported Rules and Operations

### Conditions and Operations

There are 2 types of arguments in Advanced Reviewer Settings rules. The first is the Operation:

#### Operations:

There are 3 types of operations, if a condition evaluates to true the operation will execute and evaluation with stop for that PR.

* &#x20;**Don't send to PullRequest:** This operation will prevent PRs from being sent to the network if a condition is met. This rule should be primarily used in the case that the project or org has most repositories set to auto-send. Note: This type of operation is most useful when paired with rules such as .&#x20;
* **Automatically send to PullRequest:** This operation will send to the network if the repository default setting is manual and a condition is met.
* **Automatically cancel PullRequest:** This operation will cancel an active request that has already been sent to the network or (this effectively operates as a don't send pull request command) if the repository default settings is automatic and the condition is met.

#### Conditions:

The following is a list of the conditions that can be checked and cause operations to execute.&#x20;

| **Field**                              | **Comparators**                                                                                                                                                                                                       | **Example**                                                                                          |
| -------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| Title                                  | <p><code>matches</code></p><p><code>does not match</code></p><p><code>contains</code></p><p><code>does not contain</code></p>                                                                                         | Automatically send to PullRequest if the title contains "JIRA"                                       |
| Description                            | <p><code>matches</code></p><p><code>does not match</code></p><p><code>contains</code></p><p><code>does not contain</code></p>                                                                                         | Don't send to PullRequest if the description contains "no review needed"                             |
| Head branch                            | <p><code>matches</code></p><p><code>does not match</code></p><p><code>contains</code></p><p><code>does not contain</code></p>                                                                                         | Automatically send to PullRequest if the head branch contains "feature"                              |
| Base branch                            | <p><code>matches</code></p><p><code>does not match</code></p><p><code>contains</code></p><p><code>does not contain</code></p>                                                                                         | Don't send to PullRequest if the base branch matches "main"                                          |
| Author                                 | <p><code>matches</code></p><p><code>does not match</code></p><p><code>contains</code></p><p><code>does not contain</code></p><p><code>belongs to team \[3]</code></p><p><code>does not belong to team \[3]</code></p> | Automatically send to PullRequest if the author name matches "JohnDoe"                               |
| Is a draft \[1]                        | <p><code>= true</code></p><p><code>= false</code></p>                                                                                                                                                                 | Don't send to PullRequest if the pull request is a draft                                             |
| Created                                | <p><code>after MM/DD/YYYY HH: MM AM/PM</code></p><p><code>before MM/DD/YYYY HH: MM AM/PM</code></p>                                                                                                                   | Don't send to PullRequest if the review was created before 2020-01-01 12:00                          |
| Label                                  | <p><code>matches</code></p><p><code>does not match</code></p><p><code>contains</code></p><p><code>does not contain</code></p>                                                                                         | Cancel PullRequest if the label matches "no-pullrequest"                                             |
| Commit message                         | <p><code>matches</code></p><p><code>does not match</code></p><p><code>contains</code></p><p><code>does not contain</code></p>                                                                                         | Automatically send to PullRequest if the commit message does not contain "work in progress"          |
| Commit author name                     | <p><code>matches</code></p><p><code>does not match</code></p><p><code>contains</code></p><p><code>does not contain</code></p>                                                                                         | Don't send to PullRequest if the commit author name matches "JohnDoe"                                |
| Comment message                        | <p><code>matches</code></p><p><code>does not match</code></p><p><code>contains</code></p><p><code>does not contain</code></p>                                                                                         | Automatically send to PullRequest if the commit message contains "needs review"                      |
| Comment author name                    | <p><code>matches</code></p><p><code>does not match</code></p><p><code>contains</code></p><p><code>does not contain</code></p>                                                                                         | Don't send to PullRequest if the comment author name matches "JohnDoe"                               |
| Summary comment message                | <p><code>matches</code></p><p><code>does not match</code></p><p><code>contains</code></p><p><code>does not contain</code></p>                                                                                         | Automatically send to PullRequest if the summary commant message contains "Needs PullRequest review" |
| Summary comment author name            | <p><code>matches</code></p><p><code>does not match</code></p><p><code>contains</code></p><p><code>does not contain</code></p>                                                                                         | Automatically send to PullRequest if the summary comment author name matches "JohnDoe"               |
| Diff line count                        | <p><code>=</code></p><p><code>></code></p><p><code><</code></p><p><code>≤</code><br><code>≥</code></p>                                                                                                                | Don't send to PullRequest if the diff line count is less than 10.                                    |
| Any diff file path                     | <p><code>matches</code></p><p><code>does not match</code></p><p><code>contains</code></p><p><code>does not contain</code></p>                                                                                         | Don't send to PullRequest if any diff file path contains "legacy"                                    |
| All diff file paths                    | <p><code>matches</code></p><p><code>does not match</code></p><p><code>contains</code></p><p><code>does not contain</code></p>                                                                                         | Don't send to PullRequest if all diff file path contains "legacy"                                    |
| Percentage of commits already reviewed | <p><code>=</code></p><p><code>></code></p><p><code><</code></p><p><code>≤</code><br><code>≥</code></p>                                                                                                                | Don't send to PullRequest if the percentage of commits already reviewed is greater than 90           |

**\[1]** - The "Is draft" field is only applicable for source control services that provide "Draft" features such as [**GitHub's Drafts.**](https://github.blog/2019-02-14-introducing-draft-pull-requests/)

**\[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.

**\[3]** - Currently, HackerOne Code only supports author-based Team membership rules for [GitHub Teams](https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/organizing-members-into-teams).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.pullrequest.com/customer-documentation/code-review-settings/advanced-review-settings.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
