It looks like to get the latest hash of a change it's something like:
const hash = body.push.changes.new.target.hash;
That seems a little awkward though, given the array access - will it always be the first element?
Here are the docs I am looking at: https://confluence.atlassian.com/bitbucket/event-payloads-740262817.html
And the sample payload for a push is: https://gist.github.com/ORESoftware/1ef3abe66dba23039ddd90fef1093318
I really am confused about how to access the latest hash when there's a change/push to a repository.