@@ -78,27 +78,6 @@ Please choose another assignee."
78
78
)
79
79
}
80
80
81
- pub const SELF_ASSIGN_HAS_NO_CAPACITY : & str = "
82
- You have insufficient capacity to be assigned the pull request at this time. PR assignment has been reverted.
83
-
84
- Please choose another assignee or increase your assignment limit.
85
-
86
- (see [documentation](https://forge.rust-lang.org/triagebot/pr-assignment-tracking.html))" ;
87
-
88
- pub const REVIEWER_HAS_NO_CAPACITY : & str = "
89
- `{username}` has insufficient capacity to be assigned the pull request at this time. PR assignment has been reverted.
90
-
91
- Please choose another assignee.
92
-
93
- (see [documentation](https://forge.rust-lang.org/triagebot/pr-assignment-tracking.html))" ;
94
-
95
- const NO_REVIEWER_HAS_CAPACITY : & str = "
96
- Could not find a reviewer with enough capacity to be assigned at this time. This is a problem.
97
-
98
- Please contact us on [#t-infra](https://rust-lang.zulipchat.com/#narrow/stream/242791-t-infra) on Zulip.
99
-
100
- cc: @jackh726 @apiraino" ;
101
-
102
81
const REVIEWER_IS_PR_AUTHOR : & str = "Pull request author cannot be assigned as reviewer.
103
82
104
83
Please choose another assignee." ;
@@ -308,22 +287,13 @@ async fn determine_assignee(
308
287
) ,
309
288
Err (
310
289
e @ FindReviewerError :: NoReviewer { .. }
311
- | e @ FindReviewerError :: AllReviewersFiltered { .. }
312
- | e @ FindReviewerError :: NoReviewerHasCapacity
313
- | e @ FindReviewerError :: ReviewerHasNoCapacity { .. }
314
290
| e @ FindReviewerError :: ReviewerIsPrAuthor { .. }
315
- | e @ FindReviewerError :: ReviewerAlreadyAssigned { .. } ,
291
+ | e @ FindReviewerError :: ReviewerAlreadyAssigned { .. }
292
+ | e @ FindReviewerError :: ReviewerOnVacation { .. } ,
316
293
) => log:: trace!(
317
294
"no reviewer could be determined for PR {}: {e}" ,
318
295
event. issue. global_id( )
319
296
) ,
320
- Err ( e @ FindReviewerError :: ReviewerOnVacation { .. } ) => {
321
- // TODO: post a comment on the PR if the reviewer(s) were filtered due to being on vacation
322
- log:: trace!(
323
- "no reviewer could be determined for PR {}: {e}" ,
324
- event. issue. global_id( )
325
- )
326
- }
327
297
}
328
298
}
329
299
// If no owners matched the diff, fall-through.
@@ -623,20 +593,6 @@ pub enum FindReviewerError {
623
593
/// This could happen if there is a cyclical group or other misconfiguration.
624
594
/// `initial` is the initial list of candidate names.
625
595
NoReviewer { initial : Vec < String > } ,
626
- /// All potential candidates were excluded. `initial` is the list of
627
- /// candidate names that were used to seed the selection. `filtered` is
628
- /// the users who were prevented from being assigned. One example where
629
- /// this happens is if the given name was for a team where the PR author
630
- /// is the only member.
631
- AllReviewersFiltered {
632
- initial : Vec < String > ,
633
- filtered : Vec < String > ,
634
- } ,
635
- /// No reviewer has capacity to accept a pull request assignment at this time
636
- NoReviewerHasCapacity ,
637
- /// The requested reviewer has no capacity to accept a pull request
638
- /// assignment at this time
639
- ReviewerHasNoCapacity { username : String } ,
640
596
/// Requested reviewer is on vacation
641
597
/// (i.e. username is in [users_on_vacation] in the triagebot.toml)
642
598
ReviewerOnVacation { username : String } ,
@@ -669,26 +625,6 @@ impl fmt::Display for FindReviewerError {
669
625
initial. join( "," )
670
626
)
671
627
}
672
- FindReviewerError :: AllReviewersFiltered { initial, filtered } => {
673
- write ! (
674
- f,
675
- "Could not assign reviewer from: `{}`.\n \
676
- User(s) `{}` are either the PR author, already assigned, or on vacation. \
677
- Please use `r?` to specify someone else to assign.",
678
- initial. join( "," ) ,
679
- filtered. join( "," ) ,
680
- )
681
- }
682
- FindReviewerError :: ReviewerHasNoCapacity { username } => {
683
- write ! (
684
- f,
685
- "{}" ,
686
- REVIEWER_HAS_NO_CAPACITY . replace( "{username}" , username)
687
- )
688
- }
689
- FindReviewerError :: NoReviewerHasCapacity => {
690
- write ! ( f, "{}" , NO_REVIEWER_HAS_CAPACITY )
691
- }
692
628
FindReviewerError :: ReviewerOnVacation { username } => {
693
629
write ! ( f, "{}" , on_vacation_warning( username) )
694
630
}
0 commit comments