Get last valid commit SHA on push event

For the push event, there’s github.event.before key which is intended to represent The SHA of the most recent commit on ref before the push.
If you do git push --force, then github.event.before is getting set to the commit which have been force-pushed over rather than to the actual ref valid commit SHA.
Is there a way to get SHA of the latest valid ref commit instead of ‘overwritten’ by --force pushed one for the push event?

:wave: Hey @rxu,

I don’t think there’s a way to get that before commit in the webhook payload as a force push is essentially rewriting the commit history of your ref.