Add GITHUB_HEAD_REF in check for IN_PULL_REQUEST (#60047)
Summary:
I believe IN_PULL_REQUEST is unset for some GHA test runs because we don't also check GITHUB_HEAD_REF. This PR is a small fix for that.
Example: https://github.com/pytorch/pytorch/pull/60023/checks?check_run_id=2831813860 doesn't set it properly
Pull Request resolved: https://github.com/pytorch/pytorch/pull/60047
Reviewed By: walterddr
Differential Revision: D29148233
Pulled By: janeyx99
fbshipit-source-id: 7c8c1866f39ce8af8d13c34ddc0c5786a829321e