33/**
44 * Extracts inputs from context based on event name and properties.
55 * run_id is only defined for "workflow_run:completed" events.
6- *
6+ *
77 * @param {import('github-script').AsyncFunctionArguments['github'] } github
88 * @param {import('github-script').AsyncFunctionArguments['context'] } context
99 * @param {import('github-script').AsyncFunctionArguments['core'] } core
1010 * @returns {Promise<{owner: string, repo: string, head_sha: string, issue_number: number, run_id: number }> }
1111 */
12- async function extractInputs ( github , context , core ) {
12+ export async function extractInputs ( github , context , core ) {
1313 core . info ( `extractInputs(${ context . eventName } , ${ context . payload . action } )` ) ;
1414
1515 // Add support for more event types as needed
@@ -24,11 +24,11 @@ async function extractInputs(github, context, core) {
2424 repo : payload . repository . name ,
2525 head_sha : payload . pull_request . head . sha ,
2626 issue_number : payload . number ,
27- run_id : NaN
27+ run_id : NaN ,
2828 } ;
29-
29+
3030 core . info ( `inputs: ${ JSON . stringify ( inputs ) } ` ) ;
31-
31+
3232 return inputs ;
3333 } else if (
3434 context . eventName === "workflow_run" &&
@@ -91,5 +91,3 @@ async function extractInputs(github, context, core) {
9191 ) ;
9292 }
9393}
94-
95- module . exports = { extractInputs } ;
0 commit comments