Watch
0
0
Fork
You've already forked hyperhive
0

share the standing-review rule between hive-forge and the controller

pr assign-reviewer behaves as before; the latest-review fold and the
superseded check move to hive-types::review.
This commit is contained in:
atlas 2026-10-24 14:28:23 +02:00
commit 463c5cbfcc

View file

@ -55,10 +55,8 @@ pub fn run(client: &Client, args: Args) -> Result<()> {
// Guard the add path only — withdrawing a request is always safe.
// Re-requesting from someone who already reviewed dismisses that review
// instead of no-op'ing (see the module doc-comment above).
if let Some(existing) = super::latest_reviews(client, client.repo()?, args.number)?
.into_iter()
.find(|r| r.login == args.user && !r.superseded())
{
let reviews = super::latest_reviews(client, client.repo()?, args.number)?;
if let Some(existing) = hive_types::review::standing(&reviews, &args.user) {
println!(
"not re-requesting: {} already has a standing {} review on #{} (re-requesting would dismiss it)",
args.user, existing.state, args.number