@@ -861,20 +861,10 @@ export async function waitForProcessing(
861861 await util . delay ( statusCheckBackoff , { allowProcessExit : false } ) ;
862862
863863 for (
864- let statusCheckingCount = 0 ;
865- statusCheckingCount <= STATUS_CHECK_MAX_TRIES ; // Aborts on the last loop iteration
866- statusCheckingCount ++
864+ let statusCheckCount = 1 ;
865+ statusCheckCount <= STATUS_CHECK_MAX_TRIES ;
866+ statusCheckCount ++
867867 ) {
868- if ( statusCheckingCount === STATUS_CHECK_MAX_TRIES ) {
869- // If the analysis hasn't finished processing in the allotted time, we continue anyway rather than failing.
870- // It's possible the analysis will eventually finish processing, but it's not worth spending more
871- // Actions time waiting.
872- logger . warning (
873- "Timed out waiting for analysis to finish processing. Continuing." ,
874- ) ;
875- break ;
876- }
877-
878868 let response : OctokitResponse < any > | undefined = undefined ;
879869 try {
880870 response = await client . request (
@@ -921,6 +911,16 @@ export async function waitForProcessing(
921911
922912 statusCheckBackoff *= STATUS_CHECK_BACKOFF_MULTIPLIER ;
923913 await util . delay ( statusCheckBackoff , { allowProcessExit : false } ) ;
914+
915+ if ( statusCheckCount === STATUS_CHECK_MAX_TRIES ) {
916+ // If the analysis hasn't finished processing in the allotted time, we continue anyway rather than failing.
917+ // It's possible the analysis will eventually finish processing, but it's not worth spending more
918+ // Actions time waiting.
919+ logger . warning (
920+ "Timed out waiting for analysis to finish processing. Continuing." ,
921+ ) ;
922+ break ;
923+ }
924924 }
925925 } finally {
926926 logger . endGroup ( ) ;
0 commit comments