@@ -115,7 +115,7 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
115115 let base_repo_name = matches. get_one ( "base_repo_name" ) . map ( String :: as_str) ;
116116 let head_ref = matches. get_one ( "head_ref" ) . map ( String :: as_str) ;
117117 let base_ref = matches. get_one ( "base_ref" ) . map ( String :: as_str) ;
118- let pr_number = matches. get_one ( "pr_number" ) . map ( String :: as_str) ;
118+ let pr_number = matches. get_one ( "pr_number" ) . map ( String :: as_str) . and_then ( |s| s . parse :: < i32 > ( ) . ok ( ) ) ;
119119
120120 let build_configuration = matches. get_one ( "build_configuration" ) . map ( String :: as_str) ;
121121
@@ -401,7 +401,7 @@ fn upload_file(
401401 base_repo_name : Option < & str > ,
402402 head_ref : Option < & str > ,
403403 base_ref : Option < & str > ,
404- pr_number : Option < & str > ,
404+ pr_number : Option < i32 > ,
405405) -> Result < ( ) > {
406406 const SELF_HOSTED_ERROR_HINT : & str = "If you are using a self-hosted Sentry server, \
407407 update to the latest version of Sentry to use the mobile-app upload command.";
@@ -417,7 +417,10 @@ fn upload_file(
417417 base_repo_name. unwrap_or( "unknown" ) ,
418418 head_ref. unwrap_or( "unknown" ) ,
419419 base_ref. unwrap_or( "unknown" ) ,
420- pr_number. unwrap_or( "unknown" ) ,
420+ pr_number
421+ . map( |n| n. to_string( ) )
422+ . as_deref( )
423+ . unwrap_or( "unknown" ) ,
421424 build_configuration. unwrap_or( "unknown" )
422425 ) ;
423426
@@ -511,7 +514,7 @@ fn poll_assemble(
511514 base_repo_name : Option < & str > ,
512515 head_ref : Option < & str > ,
513516 base_ref : Option < & str > ,
514- pr_number : Option < & str > ,
517+ pr_number : Option < i32 > ,
515518) -> Result < ( ) > {
516519 debug ! ( "Polling assemble for checksum: {}" , checksum) ;
517520
0 commit comments