@@ -4,6 +4,7 @@ import {canReachGitHubAPI} from "../api/canReachGitHubAPI";
44import { getGitHubContext } from "../git/repository" ;
55import { logDebug , logError } from "../log" ;
66import { RunStore } from "../store/store" ;
7+ import { CombinedWorkflowRunNode } from "./combinedWorkflows/combinedWorkflowRunNode" ;
78import { AttemptNode } from "./shared/attemptNode" ;
89import { AuthenticationNode } from "./shared/authenticationNode" ;
910import { ErrorNode } from "./shared/errorNode" ;
@@ -65,7 +66,7 @@ export class CombinedWorkflowsTreeProvider
6566 return [ ] ;
6667 }
6768
68- const allRuns : WorkflowRunNode [ ] = [ ] ;
69+ const allRuns : CombinedWorkflowRunNode [ ] = [ ] ;
6970
7071 for ( const repo of gitHubContext . repos ) {
7172 try {
@@ -75,7 +76,17 @@ export class CombinedWorkflowsTreeProvider
7576 per_page : 20
7677 } ) ;
7778
78- const runs = this . runNodes ( repo , result . data . workflow_runs , true ) ;
79+ const runs = result . data . workflow_runs . map ( runData => {
80+ const workflowRun = this . store . addRun ( repo , runData ) ;
81+ const node = new CombinedWorkflowRunNode (
82+ this . store ,
83+ repo ,
84+ workflowRun ,
85+ workflowRun . run . name || undefined
86+ ) ;
87+ this . _runNodes . set ( runData . id , node ) ;
88+ return node ;
89+ } ) ;
7990 allRuns . push ( ...runs ) ;
8091 } catch ( e ) {
8192 logError ( e as Error , `Failed to fetch runs for ${ repo . owner } /${ repo . name } ` ) ;
0 commit comments