I'd like to get the commit SHA, branch, and pull request number on a push event.
I've found GITHUB_SHA and GITHUB_REF in the environment variables. I don't see how to get the pull request number though. It looks like the push event payload doesn't include the pull request number? https://developer.github.com/v3/activity/events/types/#pushevent
Is there some other way to get the pull request number from the environment?
Solved! Solved! Go to Solution.
I think you could get the pull request information using this recent endpoint https://developer.github.com/v3/repos/commits/#list-pull-requests-associated-with-commit using the SHA that you are getting in the payload.
Let me know if that works for you!