I'm trying to test a PR handling action on Github.
For that I'm creating a PR in my own repo and trying to use ${{ github.base_ref }}, but it is empty.
This help page says that GITHUB_BASE_REF is only available for PRs from forks.
Is there a way to get the target branch for a PR event, regardless of whether it is from a forked PR or not? Or a way to address the latter case specifically.
P.S. What I'm really trying to do is to get a list of changed files in the PR. What I have works for pushes but not for PRs:
git diff-tree --no-commit-id --name-only -r ${{ github.event.before }} ${{ github.sha }}