Hey there.
I’m trying to make PR auto approve basing on following logic:
- modified files are in “dir1”: PR auto approve is triggered
- modified files are in “dir1” and “dir2”: PR auto approve is not triggered
… you can configure a workflow to run when … at least one modified file matches the configured “paths” …
So each of following code examples auto-approves PR even if modified files are not only in “dir1”, but in “dir2” as well.
on:
pull_request:
paths:
- 'dir1/**'
on:
pull_request:
paths:
- 'dir1/**'
- '!dir2/**'
on:
pull_request:
paths:
- '!dir2/**'
How can I restrict “paths” search pattern to trigger PR approving only if “dir1” is the only place with modified files?