Skip to content

Commit b22c939

Browse files
authored
Merge pull request #2 from Pajk/fix/multiple-pipelines
fix: support multiple pipelines
2 parents 9f759da + a09943a commit b22c939

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

plugin.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,10 @@ app.post('/', bodyParser.json(), async (req, res) => {
5151
const requiredFiles = py.trigger.changeset.includes
5252
const matchedFiles = glob.match(requiredFiles, filesChanged, { dot: true })
5353
console.log('Matched files for pipeline:', matchedFiles.length, 'Allowed matches:', requiredFiles)
54-
if (!matchedFiles.length) return res.json({ Data: nullYaml })
54+
if (!matchedFiles.length) {
55+
py.trigger = { event: { exclude: ['*'] } }
56+
return yaml.stringify(py)
57+
}
5558
}
5659

5760
const trimmedSteps = py.steps.filter(s => {

0 commit comments

Comments
 (0)