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:
Michal Dorner 2020-06-19 23:39:06 +02:00 committed by GitHub
parent 4eb15bc267
commit 7d201829e2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 301 additions and 91 deletions

View file

@ -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()
})
})