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.
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.
Badges are a great way to show off community activity, whether you’re a newbie or a Champion.Learn more
Hi Community, I'm Julia and I'm on the Jira Software Cloud marketing team! We're looking for companies or teams using Bitbucket Cloud and Jira Software Cloud. If your team fits the t...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs