I'm trying to use the github api (via githubot https://github.com/iangreenleaf/githubot) to GET a pull request merge commit sha from the pull request number.
I'm able to get the proper response (example here under "get a single pull request": https://developer.github.com/v3/pulls/) but the merge_commit_sha gives me this error:
fatal: bad object 304fc816f33f808080c9c87895eea2d66081d373
When I compare the 2 pages on github I'm seeing both the merge_commit_sha from the commit page but I'm seeing a different commit sha from the pull request merge page. Both parent are the same but the merge commit is different. The one returned from the api call doesn't work, but the other one let's me revert the pull request commit via
git revert -m 1 commit_sha
Here are some example screen shots
So this leads me to 2 questions: - What is the difference between those 2 commit sha's and why does only one work to revert the pull request?
- How do I obtain the merge pull request commit sha using the github api?
Thanks.