Skip to content

Commit a09943a

Browse files
committed
fix: support multiple pipelines
1 parent 13a2c54 commit a09943a

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)