Closed pull requests' commits history

Hi all,

Does someone know how to retrieve all commit’s SHA of a closed Pull Request, even though the commits history is lost?
For example, in the Apache/Drill PR 1807 (, there were 12 commits before they had squashed.
We know about reflog, however, we need to retrieve this ‘lost’ data for any GitHub repository. Would it possible?

Thanks in advance for your support,


Hi @flaviacoelho, Thanks for being here. In GitHub PR’s are also considered issues.Fetching the Issue Events for any Pull Request. With that, there will be a commit_id.

I hope this helps!

Hi @andreagriffiths11. Thanks for your remarks. I’ve been trying to gather the commit’s history (before the merged event) from that commit_id, but there’s no success - searching on public repositories. Is there any ‘default’ event before a merged event (to all PRs), from that I could fetch the last commit before a merged action, at least?