File tree Expand file tree Collapse file tree 1 file changed +20
-15
lines changed Expand file tree Collapse file tree 1 file changed +20
-15
lines changed Original file line number Diff line number Diff line change @@ -366,21 +366,26 @@ async fn workqueue_commands(
366
366
RotationMode :: OffRotation => "off rotation" ,
367
367
} ;
368
368
369
- let prs = assigned_prs
370
- . iter ( )
371
- . map ( |( pr_number, pr) | {
372
- format ! (
373
- "- [#{pr_number}](https://github.com/rust-lang/rust/pull/{pr_number}) {}" ,
374
- pr. title
375
- )
376
- } )
377
- . collect :: < Vec < String > > ( )
378
- . join ( "\n " ) ;
379
- let mut response = format ! (
380
- "`rust-lang/rust` PRs in your review queue ({} {}):\n {prs}\n " ,
381
- assigned_prs. len( ) ,
382
- pluralize( "PR" , assigned_prs. len( ) )
383
- ) ;
369
+ let mut response = if assigned_prs. is_empty ( ) {
370
+ "There are no PRs in your `rust-lang/rust` review queue\n " . to_string ( )
371
+ } else {
372
+ let prs = assigned_prs
373
+ . iter ( )
374
+ . map ( |( pr_number, pr) | {
375
+ format ! (
376
+ "- [#{pr_number}](https://github.com/rust-lang/rust/pull/{pr_number}) {}" ,
377
+ pr. title
378
+ )
379
+ } )
380
+ . collect :: < Vec < String > > ( )
381
+ . join ( "\n " ) ;
382
+ format ! (
383
+ "`rust-lang/rust` PRs in your review queue ({} {}):\n {prs}\n \n " ,
384
+ assigned_prs. len( ) ,
385
+ pluralize( "PR" , assigned_prs. len( ) )
386
+ )
387
+ } ;
388
+
384
389
writeln ! ( response, "Review capacity: `{capacity}`\n " ) ?;
385
390
writeln ! ( response, "Rotation mode: *{rotation_mode}*\n " ) ?;
386
391
writeln ! ( response, "*Note that only certain PRs that are assigned to you are included in your review queue.*" ) ?;
You can’t perform that action at this time.
0 commit comments