From 8f76e38697a884d4427331f01117cb1504129d22 Mon Sep 17 00:00:00 2001 From: "Connor Bell (Makeshift)" Date: Thu, 5 Jan 2023 15:23:35 +0000 Subject: [PATCH] [minor] actually make it work... --- src/index.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/index.js b/src/index.js index e07cf02..16d86c5 100644 --- a/src/index.js +++ b/src/index.js @@ -31,9 +31,7 @@ function parseStringTemplate (str, obj) { const clone = obj => JSON.parse(JSON.stringify(obj)) async function run () { - const { templateFile, warning } = actionOpts - - const template = yaml.load(await fs.readFile(templateFile, 'utf8')) + const template = yaml.load(await fs.readFile(actionOpts['template-file'], 'utf8')) const newUpdates = [] for (const entry of template.updates) { @@ -55,7 +53,7 @@ async function run () { core.info(`Here's the final config (JSON): ${JSON.stringify(newUpdates)}`) template.updates = newUpdates core.info('Writing config to .github/dependabot.yml') - const finalString = parseStringTemplate(warning, actionOpts) + '\n' + yaml.dump(template) + const finalString = parseStringTemplate(actionOpts['file-header'], actionOpts) + '\n' + yaml.dump(template) core.info(finalString) await fs.writeFile('.github/dependabot.yml', finalString) }