@@ -345,7 +345,7 @@ fn create_pull_request(
345345 dry_run : bool ,
346346 gh_token : & str ,
347347 base_branch : & str ,
348- ) -> Result < String , String > {
348+ ) -> Result < ( String , usize ) , String > {
349349 let current_branch = git ( & [ "branch" , "--show-current" ] ) ;
350350
351351 // Checkout the base branch (will fetch from origin if needed)
@@ -357,6 +357,7 @@ fn create_pull_request(
357357 // Now edit the files to create changes (after we're on the correct base branch)
358358 let next_pr_number = last_pr + 1 ;
359359 let words = edit_files_for_pr ( filenames, next_pr_number, config) ;
360+ let deps_count = words. len ( ) ;
360361
361362 let branch_name = format ! ( "change/{}" , words. join( "-" ) ) ;
362363 git ( & [ "checkout" , "-b" , & branch_name] ) ;
@@ -440,7 +441,7 @@ fn create_pull_request(
440441 if dry_run {
441442 git ( & [ "checkout" , & current_branch] ) ;
442443 git ( & [ "pull" ] ) ;
443- return Ok ( ( last_pr + 1 ) . to_string ( ) ) ;
444+ return Ok ( ( ( last_pr + 1 ) . to_string ( ) , deps_count ) ) ;
444445 }
445446
446447 let result = try_gh ( args. as_slice ( ) , gh_token) ;
@@ -461,7 +462,7 @@ fn create_pull_request(
461462 let caps = re. captures ( pr_url. trim ( ) ) . unwrap ( ) ;
462463 let pr_number = caps. get ( 2 ) . map_or ( "" , |m| m. as_str ( ) ) ;
463464
464- Ok ( pr_number. to_string ( ) )
465+ Ok ( ( pr_number. to_string ( ) , deps_count ) )
465466}
466467
467468fn generate ( config : & Conf , cli : & Cli ) -> anyhow:: Result < ( ) > {
@@ -549,12 +550,13 @@ fn generate(config: &Conf, cli: &Cli) -> anyhow::Result<()> {
549550 continue ;
550551 }
551552 let duration = start. elapsed ( ) ;
552- let pr = pr_result. unwrap ( ) ;
553+ let ( pr , deps_count ) = pr_result. unwrap ( ) ;
553554 println ! (
554- "created pr: {} (target: {}) in {:?} // waiting: {} mins" ,
555+ "created pr: {} (target: {}, deps: {} ) in {}s // waiting: {} mins" ,
555556 pr,
556557 base_branch,
557- duration,
558+ deps_count,
559+ duration. as_secs( ) ,
558560 ( pull_request_every as f32 / 60.0 )
559561 ) ;
560562 thread:: sleep ( Duration :: from_secs ( pull_request_every) / 2 ) ;
0 commit comments