Skip to content

Commit

Permalink
Define hoistMatch function
Browse files Browse the repository at this point in the history
  • Loading branch information
nafarlee committed Nov 30, 2023
1 parent 4c22baf commit 4727312
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions main.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,18 @@ function hoist(rootPatterns, paths) {
return Array.from(new Set(roots));
}

async function hoistMatch(rootPatterns, filterPatterns) {
const fromFilters = await fsGlob(filterPatterns);
const matches = hoist(rootPatterns, fromFilters);
core.debug(JSON.stringify({
rootPatterns,
filterPatterns,
fromFilters,
matches,
}, null, 2));
core.setOutput('matches', matches);
}

(async () => {
const { patterns, rootPatterns } = getInputs();
switch (true) {
Expand Down

0 comments on commit 4727312

Please sign in to comment.