rust-lang / triagebot

Automation/tooling for Rust spaces
https://triage.rust-lang.org
Apache License 2.0
169 stars 75 forks source link

Assign PR assignment based on work queue #1786

Closed apiraino closed 2 months ago

apiraino commented 3 months ago

This implements the new way of assigning pull requests reviews (designed in #1753). When this PR is merged, PRs in rust-lang/rust will be assigned based on user preferences. These can be queried from Zulip (see docs).

If no preferences are set, PRs will be just assigned (like always).

There are multiple points where PRs are assigned (via comment or using the GH UI), I've tried to cover all cases, took some time to test them all. The amount of changes reflect that it is not so easy to catch all spots where this happens. I wish I could make a smaller patch but I think this is an all-or-nothing situation where all cases should be handled at once.

Also modified the zulip triagebot command work show to return the # work queue capacity set by the user. This is helpful in case a PR assignment is rejected. A PR to update the documentation will follow-up after merge of this.

If a PR assignment is rejected we will return a message with some context. Examples:

Failed PR assignment to a user: screenshot-20240403-104629

Failed self-assignment: screenshot-20240403-104717

r? @jackh726

apiraino commented 2 months ago

@jackh726 I've applied your suggestions, thanks! As discussed, let's leave this here for a moment until we first merge a patch allowing people to set their own workload. Going to prepare it in short.

apiraino commented 2 months ago

1790 is up for review

jackh726 commented 2 months ago

I think you may have misunderstood. I would like to merge this before we enable allowing people to change their setting.

apiraino commented 2 months ago

I think you may have misunderstood. I would like to merge this before we enable allowing people to change their setting.

Yes, I got it the other way around, sorry. Anyway, this patch looks green. If you don't have other suggestions we can move on :+1: