We use a script to add a special layer of review when a change directly affects the databases:
pathsMatch('glob:db/*/*') || pathsMatch('glob:**/migrations/**')This script is used as part of an event handler "Auto add reviewers to pull requests" and a "Custom merge check."
The problem we are encountering is that it will flag the special review even if there are no changes in those folders on the "Diff" tab of the pull request. Here are the steps to duplicate the issue:
- Create a branch from master (db-changes)
- Create a second branch from master (no-db-changes)
- Make changes on both branches (make sure to change a file in the watched path ONLY on the db-changes branch).
- Make a pull request and merge the db-changes branch (note: it will prompt for the additional reviewers).
- Since master has updated, merge master into the no-db-changes branch to keep it up to date.
- Make a pull request for no-db-changes. (Note: It will flag for the additional reviewers but on the "Diff" tab, there will be no DB change indicated.)
I hope there there is another way to detect changes in those paths; I just can't figure out how.