rust-lang / triagebot

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

Wait for CI before assigning a reviewer #1760

Open Nadrieril opened 10 months ago

Nadrieril commented 10 months ago

We had a discussion about the review queue on Zulip, and a simple actionable point that came out of it is: rustbot should wait for CI to turn green before assigning a reviewer, to avoid the reviewer needing to remember to check back on the PR later.

As a corollary, it would be nice if @rustbot ready also waited for CI to turn green. In both cases rustbot could say "waiting for CI to turn green" (or set a waiting-on-CI label) to inform the author of what's happening.

apiraino commented 6 months ago

Link to the suggestion on Zulip.

Just to understand how that could work:

a) Apply a waiting-on-ci (or ci-running) on a new PR and when the CI completes, remove that label. Triagebot should react to the event "removed waiting-on-ci label" by throwing a dice and find a reviewer.

or

b) the triagebot should keep an internal state of the PR and choose the reviewer when the CI becomes green

Option (a) a bit easier to implement, but in both cases it should be clarified if there a hook of any kind to be notified that "CI for PR #000 is now green".

Kobzol commented 6 months ago

It is possible to listen for webhooks related to check suites assigned to a branch/PR, and find out that it all the workflows of the check suite were green, but that is a bit involved (new bors works like this). I'm not sure if there's a simpler way.

Kobzol commented 6 months ago

Maybe this is simpler.