Skip to content

Commit

Permalink
testing custom action
Browse files Browse the repository at this point in the history
  • Loading branch information
Uroš Marolt committed Jan 9, 2024
1 parent 29d7e36 commit 6ffb59c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 18 deletions.
11 changes: 4 additions & 7 deletions .github/actions/node/builder/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};


Expand Down
15 changes: 4 additions & 11 deletions .github/actions/node/src/inputs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,17 +77,10 @@ export const loadInputs = async (): Promise<IActionInputs> => {
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<string[]>(
(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)
}

0 comments on commit 6ffb59c

Please sign in to comment.