@@ -100,25 +100,22 @@ async function run() {
100100 platform . logger . debug ( `GitHub module imported: ${ typeof githubModule } ` ) ;
101101 platform . logger . debug ( `GitHub module keys: ${ Object . keys ( githubModule ) } ` ) ;
102102
103- const { default : github } = githubModule ;
104- platform . logger . debug ( `GitHub default export: ${ typeof github } ` ) ;
103+ // @actions /github exports named exports, not a default export
104+ const { context } = githubModule ;
105+ platform . logger . debug ( `GitHub context: ${ typeof context } ` ) ;
105106
106- if ( ! github ) {
107- throw new Error ( 'GitHub module default export is undefined' ) ;
108- }
109-
110- if ( ! github . context ) {
107+ if ( ! context ) {
111108 throw new Error ( 'GitHub context is undefined' ) ;
112109 }
113110
114- platform . logger . debug ( `GitHub context keys: ${ Object . keys ( github . context ) } ` ) ;
115- platform . logger . debug ( `GitHub context repo: ${ JSON . stringify ( github . context . repo ) } ` ) ;
116- platform . logger . debug ( `GitHub context job: ${ github . context . job } ` ) ;
117- platform . logger . debug ( `GitHub context runId: ${ github . context . runId } ` ) ;
118- platform . logger . debug ( `GitHub context sha: ${ github . context . sha } ` ) ;
119- platform . logger . debug ( `GitHub context ref: ${ github . context . ref } ` ) ;
111+ platform . logger . debug ( `GitHub context keys: ${ Object . keys ( context ) } ` ) ;
112+ platform . logger . debug ( `GitHub context repo: ${ JSON . stringify ( context . repo ) } ` ) ;
113+ platform . logger . debug ( `GitHub context job: ${ context . job } ` ) ;
114+ platform . logger . debug ( `GitHub context runId: ${ context . runId } ` ) ;
115+ platform . logger . debug ( `GitHub context sha: ${ context . sha } ` ) ;
116+ platform . logger . debug ( `GitHub context ref: ${ context . ref } ` ) ;
120117
121- snapshot = new Snapshot ( detector , github . context , {
118+ snapshot = new Snapshot ( detector , context , {
122119 correlator : correlatorInput ,
123120 id : platform . context . getRunId ( ) . toString ( ) ,
124121 } ) ;
0 commit comments