mirror of
https://github.com/dorny/paths-filter.git
synced 2025-06-07 16:49:03 +00:00
Support reusable paths blocks via yaml anchors (#13)
* Add support for nested arrays of path expressions * Remove pull_request trigger type options Default value is fine: opened, synchronize, reopened * Add CHANGELOG * Update README
This commit is contained in:
parent
4eb15bc267
commit
7d201829e2
9 changed files with 301 additions and 91 deletions
|
@ -90,4 +90,18 @@ describe('matching tests', () => {
|
|||
const match = filter.match(['.test/.test.js'])
|
||||
expect(match.dot).toBeTruthy()
|
||||
})
|
||||
|
||||
test('matches path based on rules included using YAML anchor', () => {
|
||||
const yaml = `
|
||||
shared: &shared
|
||||
- common/**/*
|
||||
- config/**/*
|
||||
src:
|
||||
- *shared
|
||||
- src/**/*
|
||||
`
|
||||
let filter = new Filter(yaml)
|
||||
const match = filter.match(['config/settings.yml'])
|
||||
expect(match.src).toBeTruthy()
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue