Triagebot (AKA rustbot) is a general-purpose bot used for a wide variety of tasks in the rust-lang organization, usually involving sending commands via GitHub or Zulip comments. The following pages explain the available features.
Commands are usually issued by writing comments starting with the text
The commands that are available depends on which repository you are using.
Each repository has a
triagebot.toml where you can see which features are enabled.
For example, the following comment:
@rustbot label A-diagnostics A-macros
will set the given labels on a GitHub issue or pull request, even for people who don’t have direct permissions to do that in the GitHub UI.
Commands on GitHub issues or pull requests are usually issued by writing
@rustbot followed by the command anywhere in the comment.
@rustbot will ignore commands in markdown code blocks, inline code spans, or blockquotes.
Multiple rustbot commands can be entered in a single comment.
Triagebot also allows editing of a comment. If you don’t modify the text of the command, then triagebot will ignore the edit. However, if you modify an existing command, or add new ones, then those commands will be processed.
Individual GitHub repositories can configure triagebot features via a file called
triagebot.toml in the root of the default branch.
The following pages explain the syntax needed for each feature.
For example, the
rust-lang/rust configuration file is at https://github.com/rust-lang/rust/blob/master/triagebot.toml.
When first adding
triagebot.toml to a new repository, you will need to enable permissions for the bot to operate.
This can be done by posting a PR to the
rust-lang/team database to add
bots = ["rustbot"] to the repository in the
Note that not all repositories are currently managed through the team database.
For those, reach out to the infrastructure team on the
#t-infra Zulip stream to enable the relevant permissions for the automation on the repository.
The following are some common commands you may see on rust-lang/rust.
|Assigns an issue to yourself.||Issue Assignment|
|Removes your assignment to an issue.||Issue Assignment|
|Assigns an issue to a specific user.||Issue Assignment|
|Indicates a PR is ready for review.||Shortcuts|
|Indicates a PR is waiting on the author.||Shortcuts|
|Indicates a PR is blocked on something.||Shortcuts|
|Adds two labels to an issue or PR.||Labeling|
|Removes a label from an issue or PR.||Labeling|
|Posts a comment pinging the Windows ping group.||Pinging|
|Requests prioritization from the Prioritization WG.||Prioritization|
|Assigns a PR to a user.||PR Assignment|
|Assigns to a random person in the libs review group.||PR Assignment|
|Assigns a random person from the cargo team.||PR Assignment|
The following are some common commands you may see on Zulip:
|Waits for people to read a document in a meeting.||Zulip Meeting Management|
|Checks if everyone is done discussing a topic in a meeting.||Zulip Meeting Management|
|Checks if everyone is ready to finish a meeting.||Zulip Meeting Management|
The source code for triagebot can be found at https://github.com/rust-lang/triagebot. If you are interested in extending triagebot, the documentation there should provide some guidance on how to get started.