From 548bbc459e5c201c527fda66f43d84b55c439bf4 Mon Sep 17 00:00:00 2001 From: Brett Logan Date: Thu, 12 May 2022 11:02:47 -0400 Subject: [PATCH] Fix function call --- dist/index.js | 50 ++++++++++++++++++++++++++------------------------ index.js | 50 ++++++++++++++++++++++++++------------------------ 2 files changed, 52 insertions(+), 48 deletions(-) diff --git a/dist/index.js b/dist/index.js index 6106f73..f1b9849 100644 --- a/dist/index.js +++ b/dist/index.js @@ -14381,30 +14381,6 @@ const client = new _Octokit({ } }) -(async function main() { - try { - for (let group of groups) { - core.info(`Processing group ${group}`) - let ref - if (group.includes('@')) { - [group, ref] = group.split('@') - } - const files = await retrieveFiles(group, ref) - if (Array.isArray(files)) { - for (const _file of files) { - const file = await retrieveFile(_file.path) - await processVariables(file) - } - } else { - await processVariables(files.content) - } - } - } catch (error) { - core.setFailed(`Failed processing files: ${error.message}`) - process.exit(1) - } -})() - async function retrieveFiles(group, ref) { try { core.info(`Retrieving files for group ${group}`) @@ -14468,6 +14444,32 @@ async function processVariables(rawContent) { } } +async function main() { + try { + for (let group of groups) { + core.info(`Processing group ${group}`) + let ref + if (group.includes('@')) { + [group, ref] = group.split('@') + } + const files = await retrieveFiles(group, ref) + if (Array.isArray(files)) { + for (const _file of files) { + const file = await retrieveFile(_file.path) + await processVariables(file) + } + } else { + await processVariables(files.content) + } + } + } catch (error) { + core.setFailed(`Failed processing files: ${error.message}`) + process.exit(1) + } +} + +main() + })(); module.exports = __webpack_exports__; diff --git a/index.js b/index.js index 0e337ab..4c2196b 100644 --- a/index.js +++ b/index.js @@ -31,30 +31,6 @@ const client = new _Octokit({ } }) -(async function main() { - try { - for (let group of groups) { - core.info(`Processing group ${group}`) - let ref - if (group.includes('@')) { - [group, ref] = group.split('@') - } - const files = await retrieveFiles(group, ref) - if (Array.isArray(files)) { - for (const _file of files) { - const file = await retrieveFile(_file.path) - await processVariables(file) - } - } else { - await processVariables(files.content) - } - } - } catch (error) { - core.setFailed(`Failed processing files: ${error.message}`) - process.exit(1) - } -})() - async function retrieveFiles(group, ref) { try { core.info(`Retrieving files for group ${group}`) @@ -117,3 +93,29 @@ async function processVariables(rawContent) { process.exit(1) } } + +async function main() { + try { + for (let group of groups) { + core.info(`Processing group ${group}`) + let ref + if (group.includes('@')) { + [group, ref] = group.split('@') + } + const files = await retrieveFiles(group, ref) + if (Array.isArray(files)) { + for (const _file of files) { + const file = await retrieveFile(_file.path) + await processVariables(file) + } + } else { + await processVariables(files.content) + } + } + } catch (error) { + core.setFailed(`Failed processing files: ${error.message}`) + process.exit(1) + } +} + +main()