@@ -87,6 +87,9 @@ const REVIEWER_ALREADY_ASSIGNED: &str =
87
87
88
88
Please choose another assignee." ;
89
89
90
+ // Special account that we use to prevent assignment.
91
+ const GHOST_ACCOUNT : & str = "ghost" ;
92
+
90
93
#[ derive( Debug , PartialEq , Eq , serde:: Serialize , serde:: Deserialize ) ]
91
94
struct AssignData {
92
95
user : Option < String > ,
@@ -132,7 +135,7 @@ pub(super) async fn handle_input(
132
135
// Don't auto-assign or welcome if the user manually set the assignee when opening.
133
136
if event. issue . assignees . is_empty ( ) {
134
137
let ( assignee, from_comment) = determine_assignee ( ctx, event, config, & diff) . await ?;
135
- if assignee. as_deref ( ) == Some ( "ghost" ) {
138
+ if assignee. as_deref ( ) == Some ( GHOST_ACCOUNT ) {
136
139
// "ghost" is GitHub's placeholder account for deleted accounts.
137
140
// It is used here as a convenient way to prevent assignment. This
138
141
// is typically used for rollups or experiments where you don't
@@ -694,8 +697,8 @@ async fn find_reviewer_from_names(
694
697
) ;
695
698
696
699
// Special case user "ghost", we always skip filtering
697
- if candidates. contains ( "ghost" ) {
698
- return Ok ( "ghost" . to_string ( ) ) ;
700
+ if candidates. contains ( GHOST_ACCOUNT ) {
701
+ return Ok ( GHOST_ACCOUNT . to_string ( ) ) ;
699
702
}
700
703
701
704
// Return unfiltered list of candidates
0 commit comments