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:
I hope there there is another way to detect changes in those paths; I just can't figure out how.
Hi... pathsMatch
when used in the context of a pull request, will look at the changes that will be delivered as part of that pull request, similar to if you do:
git log --name-status ..pull-request-branch
You should see the watched files on the log of the no-db-changes branch.
The problem is happening in step 5. If you rebase the no-db-changes branch on to master, the changes will not include the watched files, eg git rebase master
, when on the pr branch.
Perhaps there should be an additional function like pathsMatch that only considers the diff, however in many cases you want to prevent files getting in to your repo, even if there was a delete of the file after adding.
Good discussion on this at https://www.atlassian.com/git/tutorials/merging-vs-rebasing/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.