From ed8b95b28e9181cda2760e0b9ca7c0c9092bbdc0 Mon Sep 17 00:00:00 2001 From: Urgau Date: Tue, 17 Feb 2026 21:08:22 +0100 Subject: [PATCH] Don't raise reviewer already assigned when there are multiple assignees --- src/handlers/assign.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/handlers/assign.rs b/src/handlers/assign.rs index a0ad4396b..7e062414f 100644 --- a/src/handlers/assign.rs +++ b/src/handlers/assign.rs @@ -328,7 +328,7 @@ async fn set_assignee( IssueData::load(&mut db, issue, PREVIOUS_REVIEWERS_KEY).await?; // Don't re-assign if already assigned, e.g. on comment edit - if issue.contain_assignee(&reviewer.name) { + if issue.contain_assignee(&reviewer.name) && issue.assignees.len() == 1 { log::trace!( "ignoring assign PR {} to {}, already assigned", issue.global_id(), @@ -709,6 +709,13 @@ pub(super) async fn handle_command( .await { Ok(assignee) => assignee, + Err(FindReviewerError::ReviewerAlreadyAssigned { username }) + if issue.contain_assignee(&event.user().login) => + { + // If one of the assignee tries to assign another already assigned user, + // let it pass, as it means they wanted to be removed from the assignee list. + ReviewerSelection::new(username, Vec::new()) + } Err(e) => { issue.post_comment(&ctx.github, &e.to_string()).await?; return Ok(());