Useful when the author force-pushed (rebased/amended) after your review, so no branch points to the commit you reviewed anymore.
gh pr checkout 1234 # or update your existing checkout of the PR
gh since-review# Alias to find the SHA at your latest review.
# Takes an optional PR number; defaults to the PR of the current branch.
gh alias set last-review-commit --shell \
'pr=${1:-$(gh pr view --json number --jq .number)} || exit
gh api "repos/{owner}/{repo}/pulls/$pr/reviews" --paginate \
--jq ".[] | select(.user.login==\"$(gh api user --jq .login)\") | .commit_id" | tail -n1'
# Get changes since the last review
gh alias set since-review --clobber --shell \
'base=$(gh pr view --json baseRefName --jq .baseRefName) &&
old=$(gh last-review-commit) &&
git fetch origin "$base" "$old" &&
git range-diff "origin/$base" "$old" HEAD'