From 560f6eceefed38b362323d7e5b89ab29e32dd6d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uro=C5=A1=20Marolt?= Date: Tue, 9 Jan 2024 12:10:40 +0100 Subject: [PATCH] testing custom action --- .github/actions/node/builder/index.js | 11 ++++------- .github/actions/node/src/inputs.ts | 15 ++++----------- 2 files changed, 8 insertions(+), 18 deletions(-) diff --git a/.github/actions/node/builder/index.js b/.github/actions/node/builder/index.js index 5c3fafabf5..39d2c340aa 100644 --- a/.github/actions/node/builder/index.js +++ b/.github/actions/node/builder/index.js @@ -24848,15 +24848,12 @@ const loadInputs = async () => { return results; }; exports.loadInputs = loadInputs; -const getInputList = (name, ignoreComma) => { +const getInputList = (name) => { const items = core.getInput(name); - if (items === '') { - return []; - } return items - .split(/\r?\n/) - .filter((x) => x) - .reduce((acc, line) => acc.concat(!ignoreComma ? line.split(',').filter((x) => x) : line).map((pat) => pat.trim()), []); + .split(' ') + .map((s) => s.trim()) + .filter((s) => s.length > 0); }; diff --git a/.github/actions/node/src/inputs.ts b/.github/actions/node/src/inputs.ts index eb3db71cda..ae4aa08454 100644 --- a/.github/actions/node/src/inputs.ts +++ b/.github/actions/node/src/inputs.ts @@ -77,17 +77,10 @@ export const loadInputs = async (): Promise => { return results } -const getInputList = (name: string, ignoreComma?: boolean): string[] => { +const getInputList = (name: string): string[] => { const items = core.getInput(name) - if (items === '') { - return [] - } return items - .split(/\r?\n/) - .filter((x) => x) - .reduce( - (acc, line) => - acc.concat(!ignoreComma ? line.split(',').filter((x) => x) : line).map((pat) => pat.trim()), - [], - ) + .split(' ') + .map((s) => s.trim()) + .filter((s) => s.length > 0) }