Skip to content

Commit

Permalink
Merge pull request #9 from keiththompson/keith/dedupe
Browse files Browse the repository at this point in the history
only add directory once
  • Loading branch information
keiththompson authored Nov 30, 2020
2 parents 1ea394b + 89a7bc0 commit 562467b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ function parseDirectories(file, depth, targetDirectory) {
}

function buildMatrix(changedDirectories) {
include = [];
var directory;
for (directory of changedDirectories) {
let directories = [...new Set(changedDirectories)];
let include = []
for (directory of directories) {
include.push({'directory': directory});
}
return {'include': include};
Expand Down
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ function parseDirectories(file, depth, targetDirectory) {
}

function buildMatrix(changedDirectories) {
include = [];
var directory;
for (directory of changedDirectories) {
let directories = [...new Set(changedDirectories)];
let include = []
for (directory of directories) {
include.push({'directory': directory});
}
return {'include': include};
Expand Down

0 comments on commit 562467b

Please sign in to comment.