Needs Review

Automatically make new pull requests part of your triage process.

Quick Start

The Needs Review bot monitors newly created pull requests and automatically adds a label of your choice to them. This means that looking at new pull requests in your triage process can be as simple as filtering on a label.

The bot can be asked to wait a little while before it looks at a new pull request and it can also be told to not assign the label when specific conditions are met. For example, when the pull request already has a reviewer assigned.

The bot will always ignore draft pull requests until their status changes to Ready for Review.

Placing the following configuration in .devbots/needs-review.yml in your repository will instruct the bot to wait for one day (1440 minutes) after a new pull requests appears and then add a needs-triage label.

enabled: true
label: "needs-review"
delay: 1440 # Wait one day

When the bot looks at the pull request, a day after it was opened, it will evaluate if the label still needs to be added. If the pull request has already been reviewed or if it has been closed or merged then it will not do anything.

Configuration

The Needs Review bot is configured by adding a .devbots/needs-review.yml file to the repository where you installed the bot. This file is in the YAML format, and can contain the following configuration options:

enabled boolean whether the bot is active or not
label string the label to add on new issues
delay number the number of minutes to wait before looking at a new issue
skip_when_has_assignee boolean do not add the label if the pull request has a assignee
skip_when_has_reviewer boolean do not add the label if the pull request has a reviewer

The skip_when_has_assignee and skip_when_has_reviewer options are evaluated after the delay.

Examples

Minimal Example

Placing the following configuration in .devbots/needs-review.yml will make the bot immediately add a needs-review label to newly created pull requests.

enabled: true
label: "needs-review"

Delaying the Bot

Placing the following configuration in .devbots/needs-review.yml will make the bot wait 2 hours before the review label is added.

enabled: true
label: "review"
delay: 120