File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ use std::fmt;
16
16
pub enum AssignCommand {
17
17
/// Corresponds to `@bot claim`.
18
18
Claim ,
19
- /// Corresponds to `@bot release-assignment`.
19
+ /// Corresponds to `@bot release-assignment` or `@bot unclaim` .
20
20
ReleaseAssignment ,
21
21
/// Corresponds to `@bot assign @user`.
22
22
AssignUser { username : String } ,
@@ -68,7 +68,7 @@ impl AssignCommand {
68
68
} else {
69
69
return Err ( toks. error ( ParseError :: NoUser ) ) ;
70
70
}
71
- } else if let Some ( Token :: Word ( "release-assignment" ) ) = toks. peek_token ( ) ? {
71
+ } else if let Some ( Token :: Word ( "release-assignment" | "unclaim" ) ) = toks. peek_token ( ) ? {
72
72
toks. next_token ( ) ?;
73
73
if let Some ( Token :: Dot ) | Some ( Token :: EndOfLine ) = toks. peek_token ( ) ? {
74
74
toks. next_token ( ) ?;
@@ -181,4 +181,9 @@ mod tests {
181
181
)
182
182
}
183
183
}
184
+
185
+ #[ test]
186
+ fn unclaim ( ) {
187
+ assert_eq ! ( parse( "unclaim" ) , Ok ( Some ( AssignCommand :: ReleaseAssignment ) ) ) ;
188
+ }
184
189
}
You can’t perform that action at this time.
0 commit comments