How to get SHA merge transaction to merge tensile request?

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:

enter image description here

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?

+5
source share
1 answer

All upload requests are also problems. This way you can get "Events" for any Pull request. This will be commit_id . If this attribute is present with the merged attribute, then this should be the SHA of the merge commit.

+2
source

Source: https://habr.com/ru/post/1205759/


All Articles