Hi there
I want to change the build status via REST API. So I use:
/2.0/repositories/{username}/{repo_slug}/commit/{node}/statuses/build
but, I have to provide {node}, which is "The commit's SHA1."
I've seen that I can get the commit's SHA1 using /2.0/repositories/{username}/{repo_slug}/commits.
But at no other place (that I could find). And there is no identifier of which pull request is which.
Is there a way to get a commit's SHA1 by pull request id?
EDIT: I found a way: /2.0/repositories/{username}/{repo_slug}/pullrequests/{pull_request_id}/commits.
It lists the commits of a specific pull request. But I am interested in the latest one. can I be sure that the first commit in the list is the latest one?