@@ -100,25 +100,22 @@ async function run() {
100
100
platform . logger . debug ( `GitHub module imported: ${ typeof githubModule } ` ) ;
101
101
platform . logger . debug ( `GitHub module keys: ${ Object . keys ( githubModule ) } ` ) ;
102
102
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 } ` ) ;
105
106
106
- if ( ! github ) {
107
- throw new Error ( 'GitHub module default export is undefined' ) ;
108
- }
109
-
110
- if ( ! github . context ) {
107
+ if ( ! context ) {
111
108
throw new Error ( 'GitHub context is undefined' ) ;
112
109
}
113
110
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 } ` ) ;
120
117
121
- snapshot = new Snapshot ( detector , github . context , {
118
+ snapshot = new Snapshot ( detector , context , {
122
119
correlator : correlatorInput ,
123
120
id : platform . context . getRunId ( ) . toString ( ) ,
124
121
} ) ;
0 commit comments