@@ -37,7 +37,7 @@ const exec = __importStar(require("@actions/exec"));
3737const fs = __importStar ( require ( "fs" ) ) ;
3838const path = __importStar ( require ( "path" ) ) ;
3939function 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 ) ;
4141}
4242// These are added run actions using "env:"
4343let runner = JSON . parse ( process . env . RUNNER || "" ) ;
@@ -92,6 +92,11 @@ from concurrent.futures import ThreadPoolExecutor, as_completed
9292from time import sleep
9393
9494logging.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+ )
95100
96101params = {}
97102paramsPath = '${ paramsFile } '
@@ -154,8 +159,10 @@ for task in as_completed(results):
154159 }
155160 finally {
156161 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+ }
159166 }
160167 } ) ;
161168}
0 commit comments