Skip to content

Commit

Permalink
fix: case where no changeset was defined
Browse files Browse the repository at this point in the history
  • Loading branch information
kdnutrien committed Sep 27, 2021
1 parent 51aa1fd commit 567ff8f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@ app.post('/', bodyParser.json({limit: '50mb'}), async (req, res) => {
}

const transformedSteps = py.steps.map(s => {
if (!s.when || !s.when.changeset || !s.when.changeset.includes) return true
if (!s.when || !s.when.changeset || !s.when.changeset.includes) {
return s;
}

const requiredFiles = s.when.changeset.includes
const matchedFiles = glob.match(requiredFiles, filesChanged, { dot: true })
console.log('Matched files for step:', matchedFiles.length, 'Allowed matches:', requiredFiles)
Expand Down

0 comments on commit 567ff8f

Please sign in to comment.