Review queue tracking

Triagebot supports more advanced tracking of reviewers' workload in the rust-lang/rust repository. It tracks how many "relevant" pull requests are assigned to each reviewer, and allows reviewers to configure maximum capacity of such PRs, and also if they want to be automatically assigned or not.

This page describes how the review queue works and how you can interact with triagebot on Zulip to configure and examine the review queue.

Configuration

To enable review queue tracking for a repository, include [pr-tracking] table in its triagebot.toml.

To take the review queue into account when assigning reviewers on PRs, add a [assign.review_prefs] table to triagebot.toml.

Note that this functionality currently only works for the rust-lang/rust repository (it is hardcoded in triagebot). Enabling it for more repositories requires additional design and implementation work.

Review queue design

The review queue remembers how many "relevant" rust-lang/rust PRs are assigned to each reviewer at any given point in time. Currently, the heuristic for what makes a PR "relevant" works as follows:

If a PR passes all these checks and it is assigned to reviewer R, it will be considered to be in R's review queue.

See the implementation of the waits_for_a_review function in triagebot for more details.

Review preferences

Reviewers can configure review preferences that are taken into account when determining who to assign on a PR:

Note that the review preferences only affect assignment based on adhoc groups or teams. If someone directly requests your review (r? <user>), triagebot will currently always assign you. If you are off rotation or at your maximum review capacity, triagebot will send a comment to the PR where you were directly assigned to let the PR author know that you might not be available for a timely review.

Usage

You can examine your review queue and configure your review preferences by sending a Direct Message command to triagebot:

Implementation

See src/handlers/pr_tracking.rs.