@@ -525,7 +525,7 @@ pub(super) async fn handle_command(
525525 let issue = event. issue ( ) . unwrap ( ) ;
526526 if issue. is_pr ( ) {
527527 if !issue. is_open ( ) {
528- inform ! ( "Assignment is not allowed on a closed PR." ) ;
528+ return user_error ! ( "Assignment is not allowed on a closed PR." ) ;
529529 }
530530 if matches ! (
531531 event,
@@ -609,7 +609,7 @@ pub(super) async fn handle_command(
609609 AssignCommand :: Claim => event. user ( ) . login . clone ( ) ,
610610 AssignCommand :: AssignUser { username } => {
611611 if !is_team_member && username != event. user ( ) . login {
612- inform ! ( "Only Rust team members can assign other users" ) ;
612+ return user_error ! ( "Only Rust team members can assign other users" ) ;
613613 }
614614 username. clone ( )
615615 }
@@ -624,7 +624,7 @@ pub(super) async fn handle_command(
624624 e. apply ( & ctx. github , String :: new ( ) ) . await ?;
625625 return Ok ( ( ) ) ;
626626 } else {
627- inform ! ( "Cannot release another user's assignment" ) ;
627+ return user_error ! ( "Cannot release another user's assignment" ) ;
628628 }
629629 } else {
630630 let current = & event. user ( ) . login ;
@@ -636,11 +636,13 @@ pub(super) async fn handle_command(
636636 e. apply ( & ctx. github , String :: new ( ) ) . await ?;
637637 return Ok ( ( ) ) ;
638638 } else {
639- inform ! ( "Cannot release unassigned issue" ) ;
639+ return user_error ! ( "Cannot release unassigned issue" ) ;
640640 }
641641 } ;
642642 }
643- AssignCommand :: RequestReview { .. } => inform ! ( "r? is only allowed on PRs." ) ,
643+ AssignCommand :: RequestReview { .. } => {
644+ return user_error ! ( "r? is only allowed on PRs." ) ;
645+ }
644646 } ;
645647 // Don't re-assign if aleady assigned, e.g. on comment edit
646648 if issue. contain_assignee ( & to_assign) {
0 commit comments