From a09943adb99d064298a0e30ee3406dca7e82dc60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20Pokorn=C3=BD?= Date: Thu, 14 Feb 2019 17:15:24 +0100 Subject: [PATCH] fix: support multiple pipelines --- plugin.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugin.js b/plugin.js index 759d7f9..8bb1857 100644 --- a/plugin.js +++ b/plugin.js @@ -51,7 +51,10 @@ app.post('/', bodyParser.json(), async (req, res) => { const requiredFiles = py.trigger.changeset.includes const matchedFiles = glob.match(requiredFiles, filesChanged, { dot: true }) console.log('Matched files for pipeline:', matchedFiles.length, 'Allowed matches:', requiredFiles) - if (!matchedFiles.length) return res.json({ Data: nullYaml }) + if (!matchedFiles.length) { + py.trigger = { event: { exclude: ['*'] } } + return yaml.stringify(py) + } } const trimmedSteps = py.steps.filter(s => {