File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -290,9 +290,13 @@ async fn check_pr_file_changes(
290290 Err ( _) => return Ok ( Some ( ValidationResult :: CouldNotMatch ) ) , // Failed to find the right task
291291 } ;
292292 let task_issue_body = task_issue. body . unwrap_or_default ( ) ;
293- let directory_description = Regex :: new ( "CHANGE_DIR=(.+)\\ n" ) . unwrap ( ) ;
293+ let directory_description =
294+ Regex :: new ( "CHANGE_DIR=(.+)\\ n" ) . expect ( "Known good regex failed to compile" ) ;
294295 let directory_description_regex = match directory_description. captures ( & task_issue_body) {
295- Some ( capts) => capts. get ( 1 ) . unwrap ( ) . as_str ( ) , // Only allows a single directory for now
296+ Some ( capts) => capts
297+ . get ( 1 )
298+ . expect ( "Regex capture failed to return string match" )
299+ . as_str ( ) , // Only allows a single directory for now
296300 None => return Ok ( None ) , // There is no match defined for this task, don't do any more checks
297301 } ;
298302 let directory_matcher = Regex :: new ( directory_description_regex)
You can’t perform that action at this time.
0 commit comments