@@ -37,7 +37,7 @@ const exec = __importStar(require("@actions/exec"));
37
37
const fs = __importStar ( require ( "fs" ) ) ;
38
38
const path = __importStar ( require ( "path" ) ) ;
39
39
function findNestedObj ( obj , keys ) {
40
- keys . reduce ( ( o , key ) => o && typeof o [ key ] !== 'undefined' ? o [ key ] : undefined , obj ) ;
40
+ return keys . reduce ( ( o , key ) => o && typeof o [ key ] !== 'undefined' ? o [ key ] : undefined , obj ) ;
41
41
}
42
42
// These are added run actions using "env:"
43
43
let runner = JSON . parse ( process . env . RUNNER || "" ) ;
@@ -92,6 +92,11 @@ from concurrent.futures import ThreadPoolExecutor, as_completed
92
92
from time import sleep
93
93
94
94
logging.basicConfig(level=logging.INFO, format="%(message)s")
95
+ # TODO: Figure out why the basic config isn't setting the defaults for structlog
96
+ import structlog
97
+ structlog.configure(
98
+ wrapper_class=structlog.make_filtering_bound_logger(logging.INFO),
99
+ )
95
100
96
101
params = {}
97
102
paramsPath = '${ paramsFile } '
@@ -154,8 +159,10 @@ for task in as_completed(results):
154
159
}
155
160
finally {
156
161
const notebookObj = JSON . parse ( fs . readFileSync ( parsedNotebookFile , 'utf8' ) ) ;
157
- const executionURL = findNestedObj ( notebookObj , [ "metadata" , "executed_notebook_url" ] ) ;
158
- yield exec . exec ( `echo "Notebook run can be found at ${ executionURL } "` ) ;
162
+ const executionURL = notebookObj . metadata . executed_notebook_url ;
163
+ if ( executionURL ) {
164
+ yield exec . exec ( `echo "Notebook run can be found at ${ executionURL } "` ) ;
165
+ }
159
166
}
160
167
} ) ;
161
168
}
0 commit comments