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;
1616pub enum AssignCommand {
1717 /// Corresponds to `@bot claim`.
1818 Claim ,
19- /// Corresponds to `@bot release-assignment`.
19+ /// Corresponds to `@bot release-assignment` or `@bot unclaim` .
2020 ReleaseAssignment ,
2121 /// Corresponds to `@bot assign @user`.
2222 AssignUser { username : String } ,
@@ -68,7 +68,7 @@ impl AssignCommand {
6868 } else {
6969 return Err ( toks. error ( ParseError :: NoUser ) ) ;
7070 }
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 ( ) ? {
7272 toks. next_token ( ) ?;
7373 if let Some ( Token :: Dot ) | Some ( Token :: EndOfLine ) = toks. peek_token ( ) ? {
7474 toks. next_token ( ) ?;
@@ -181,4 +181,9 @@ mod tests {
181181 )
182182 }
183183 }
184+
185+ #[ test]
186+ fn unclaim ( ) {
187+ assert_eq ! ( parse( "unclaim" ) , Ok ( Some ( AssignCommand :: ReleaseAssignment ) ) ) ;
188+ }
184189}
You can’t perform that action at this time.
0 commit comments