@@ -15,6 +15,8 @@ interface OtherSites {
1515export class DataModel {
1616 status : Status = EMPTY_STATUS ;
1717
18+ serverBuildVersion : string = '' ;
19+
1820 serviceState : { service : ServiceIdentifier , state : ServiceState , message ?: string } [ ] ;
1921
2022 platforms : PlatformSpec [ ] = JSON . parse ( JSON . stringify ( platforms ) ) ; // makes a copy of the constant platform data for this component
@@ -86,6 +88,7 @@ export class DataModel {
8688 break ;
8789 case ServiceIdentifier . GitHub :
8890 this . status . github = data . github ;
91+ this . status . keymanRepo = this . status . github ?. data . organization . repositories . nodes . find ( e => e . name == 'keyman' ) ;
8992 this . keyboardPRs = this . status . github ?. data . organization . repositories . nodes . find ( e => e . name == 'keyboards' ) ?. pullRequests . edges ;
9093 this . lexicalModelPRs = this . status . github ?. data . organization . repositories . nodes . find ( e => e . name == 'lexical-models' ) ?. pullRequests . edges ;
9194 this . transformPlatformStatusData ( ) ;
@@ -181,7 +184,7 @@ export class DataModel {
181184 for ( let platform of this . platforms ) {
182185 platform . pulls = [ ] ;
183186 platform . pullsByEmoji = { } ;
184- for ( let pull of this . status . github . data . repository . pullRequests . edges ) {
187+ for ( let pull of this . status . keymanRepo . pullRequests . edges ) {
185188 pull . node . checkSummary = pullChecks ( pull ) ;
186189 let labels = pull . node . labels . edges ;
187190 let status = pull . node . commits . edges [ 0 ] . node . commit . status ;
@@ -237,8 +240,8 @@ export class DataModel {
237240 } )
238241 } ;
239242
240- if ( this . status . github && this . status . github . data ) {
241- this . status . github . data . repository . pullRequests . edges . forEach ( item => {
243+ if ( this . status . keymanRepo ) {
244+ this . status . keymanRepo . pullRequests . edges . forEach ( item => {
242245 removeDuplicates ( item . node . timelineItems ) ;
243246 } ) ;
244247 }
@@ -360,7 +363,7 @@ export class DataModel {
360363
361364 // TODO: split search against future and current milestones (future milestone shows only count; current milestone shows more detail)
362365 // For each platform, fill in the milestone counts
363- this . status . github . data . repository . issuesByLabelAndMilestone . edges . forEach ( label => {
366+ this . status . github . data . repositoryRefsLabelsMilestones . issueLabels . edges . forEach ( label => {
364367 let platform = this . getPlatform ( label . node . name . substring ( 0 , label . node . name . length - 1 ) ) ;
365368 if ( ! platform ) return ;
366369 platform . totalIssueCount = label . node . openIssues . totalCount ;
@@ -453,8 +456,8 @@ export class DataModel {
453456
454457 extractUnlabeledPulls ( ) {
455458 this . unlabeledPulls = [ ] ;
456- for ( let q in this . status . github . data . repository . pullRequests . edges ) {
457- let pull = this . status . github . data . repository . pullRequests . edges [ q ] ;
459+ for ( let q in this . status . keymanRepo . pullRequests . edges ) {
460+ let pull = this . status . keymanRepo . pullRequests . edges [ q ] ;
458461 if ( ! this . labeledPulls . includes ( pull ) ) {
459462 this . unlabeledPulls . push ( { pull :pull } ) ;
460463 }
@@ -501,8 +504,8 @@ export class DataModel {
501504 this . pullsByStatus . waitingReview = [ ] ;
502505 this . pullsByStatus . waitingTest = [ ] ;
503506 this . pullsByStatus . waitingResponse = [ ] ;
504- for ( let q in this . status . github . data . repository . pullRequests . edges ) {
505- let pull = this . status . github . data . repository . pullRequests . edges [ q ] ;
507+ for ( let q in this . status . keymanRepo . pullRequests . edges ) {
508+ let pull = this . status . keymanRepo . pullRequests . edges [ q ] ;
506509 let emoji = pullEmoji ( pull ) || "other" ;
507510 if ( ! this . pullsByProject [ emoji ] ) this . pullsByProject [ emoji ] = [ ] ;
508511
@@ -617,7 +620,7 @@ export class DataModel {
617620 }
618621
619622 while ( pull && ! pull . node . baseRefName . match ( ultimateBaseRef ) ) {
620- pull = this . status . github . data . repository . pullRequests . edges . find ( e => e . node . headRefName == pull . node . baseRefName ) ;
623+ pull = this . status . keymanRepo . pullRequests . edges . find ( e => e . node . headRefName == pull . node . baseRefName ) ;
621624 }
622625
623626 input . node . ultimateBaseRefName = pull ? pull . node . baseRefName : 'unknown' ;
0 commit comments