Skip to content

Commit

Permalink
Fix function call
Browse files Browse the repository at this point in the history
  • Loading branch information
lindluni committed May 12, 2022
1 parent 293ec52 commit 548bbc4
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 48 deletions.
50 changes: 26 additions & 24 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}`)
Expand Down Expand Up @@ -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__;
Expand Down
50 changes: 26 additions & 24 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}`)
Expand Down Expand Up @@ -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()

0 comments on commit 548bbc4

Please sign in to comment.