I use "make patchcheck" a fair bit as a checklist for whether or not a change needs any further adjustments before merging, but found it's patch-based approach less then helpful with the new PR-centric workflow.
Accordingly, I just merged a few key updates to master and the 2.7/3.5/3.6 branches:
files changed relatively to that branch, rather than only checking uncommitted changes
directories), since "git worktree" defines ".git" as a configuration file
The automatic determination of the base branch is as follows:
otherwise "origin" is used
Note that this works fine for "make patchcheck" (since it uses the just built Python to run Tools/scripts/patchcheck.py), but anyone running the tool directly rather than through the makefile may have to adjust how they do things.