From 68e6c95e795580620f9e96fadccac7301767e253 Mon Sep 17 00:00:00 2001 From: Dawid Dziurla Date: Tue, 13 Jul 2021 18:30:04 +0200 Subject: [PATCH] main: fix attachments --- main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index 05c35192..d8f30a47 100644 --- a/main.js +++ b/main.js @@ -33,7 +33,7 @@ function getFrom(from, username) { async function getAttachments(attachments) { const globber = await glob.create(attachments.split(',').join('\n')) const files = await globber.glob() - return files.map(f => ({ path: f })) + return files } async function main() { @@ -83,7 +83,7 @@ async function main() { text: body ? getBody(body, false) : undefined, html: htmlBody ? getBody(htmlBody, convertMarkdown) : undefined, priority: priority ? priority : undefined, - attachments: attachments ? getAttachments(attachments) : undefined, + attachments: attachments ? (await getAttachments(attachments)) : undefined, }) } catch (error) { core.setFailed(error.message)