There is a related GET pull request merge commit sha question from the download request number using the github api , but no answer.
According to the GitHub API, when a Pull request has been merged, it fires the pull_request event with action: closed . An event is also available from the event API. However, there is only merged (which is true if the stretch request was merged) and deprecated merge_commit_sha (SHA of the temporary commit, and not the actual commit by which the transfer request was linked).
There is also an API for handling download requests ; but according to the documentation, it will also return only whether there was a pull request, and what is a temporary SHA commit (in an obsolete field).
The withdrawal request is clearly related to the merge commit in some way, since the SHA commit is displayed on the traction request page:

Is there any way to get the SHA commit programmatically with which the pull request was combined with the base, knowing the id of the pull request?
source share