What’s the original JSON? Happy to try and express this in jq
I'm looking forward to your jq version. I love jq and use it all the time, but for anything of that complexity, I'd probably just use Python.
group_by(.commit.author.name) | map({key: first.commit.author.name, value: length}) | sort_by(.value) | reverse[:10] | from_entries