@@ -573,56 +573,56 @@ public function requestFromGithub($page)
573573
574574 foreach ($ pulls as $ pull )
575575 {
576- // Check if this PR is RTC and has a `PR-` branch label
577- $ isRTC = false ;
578- $ isNPM = false ;
579- $ branch = '' ;
576+ // Check if this PR is RTC and has a `PR-` branch label
577+ $ isRTC = false ;
578+ $ isNPM = false ;
579+ $ branch = '' ;
580580
581- foreach ($ pull ->labels as $ label )
581+ foreach ($ pull ->labels as $ label )
582+ {
583+ if (strtolower ($ label ->name ) === 'rtc ' )
582584 {
583- if (strtolower ($ label ->name ) === 'rtc ' )
584- {
585- $ isRTC = true ;
586- }
587- elseif (strpos ($ label ->name , 'PR- ' ) === 0 )
588- {
589- $ branch = substr ($ label ->name , 3 );
590- }
591- elseif (in_array (
592- strtolower ($ label ->name ),
593- ['npm resource changed ' , 'composer dependency changed ' ],
594- true
595- ))
596- {
597- $ isNPM = true ;
598- }
599-
600- $ labels [] = implode (
601- ', ' ,
602- [
603- (int ) $ pull ->number ,
604- $ this ->getDb ()->quote ($ label ->name ),
605- $ this ->getDb ()->quote ($ label ->color ),
606- ]
607- );
585+ $ isRTC = true ;
586+ }
587+ elseif (strpos ($ label ->name , 'PR- ' ) === 0 )
588+ {
589+ $ branch = substr ($ label ->name , 3 );
590+ }
591+ elseif (in_array (
592+ strtolower ($ label ->name ),
593+ ['npm resource changed ' , 'composer dependency changed ' ],
594+ true
595+ ))
596+ {
597+ $ isNPM = true ;
608598 }
609599
610- // Build the data object to store in the database
611- $ pullData = [
612- (int ) $ pull ->number ,
613- $ this ->getDb ()->quote (
614- HTMLHelper::_ ('string.truncate ' , $ pull ->title , 150 )
615- ),
616- $ this ->getDb ()->quote (
617- HTMLHelper::_ ('string.truncate ' , $ pull ->body , 100 )
618- ),
619- $ this ->getDb ()->quote ($ pull ->html_url ),
620- (int ) $ isRTC ,
621- (int ) $ isNPM ,
622- $ this ->getDb ()->quote ($ branch ),
623- ];
600+ $ labels [] = implode (
601+ ', ' ,
602+ [
603+ (int ) $ pull ->number ,
604+ $ this ->getDb ()->quote ($ label ->name ),
605+ $ this ->getDb ()->quote ($ label ->color ),
606+ ]
607+ );
608+ }
609+
610+ // Build the data object to store in the database
611+ $ pullData = [
612+ (int ) $ pull ->number ,
613+ $ this ->getDb ()->quote (
614+ HTMLHelper::_ ('string.truncate ' , $ pull ->title , 150 )
615+ ),
616+ $ this ->getDb ()->quote (
617+ HTMLHelper::_ ('string.truncate ' , $ pull ->body , 100 )
618+ ),
619+ $ this ->getDb ()->quote ($ pull ->html_url ),
620+ (int ) $ isRTC ,
621+ (int ) $ isNPM ,
622+ $ this ->getDb ()->quote ($ branch ),
623+ ];
624624
625- $ data [] = implode (', ' , $ pullData );
625+ $ data [] = implode (', ' , $ pullData );
626626 }
627627
628628 // If there are no pulls to insert then bail, assume we're finished
0 commit comments