I want my Python Flask server to send a GET Request to the GitHub REST API V3, asking for all commits messages in a Pull Request, and perhaps receive it as a single payload.
Any suggestions on how I can approach this issue?
I want my Python Flask server to send a GET Request to the GitHub REST API V3, asking for all commits messages in a Pull Request, and perhaps receive it as a single payload.
Any suggestions on how I can approach this issue?
For further actions, you may consider blocking this person and/or reporting abuse
arjun -
Lakshmi Sankar -
Praneeth -
Yoel Benítez Fonseca -
Top comments (3)
Hi, there's an edpoint for that: developer.github.com/v3/pulls/#lis...
You either write the client yourself, using requests for example or you can use PyGithub and its method PullRequest.get_commits()
That's what I'm doing.
But the only thing I'm getting at this point is the number of commits as a count. (e.g. 13 if a PR has 13 commits, or 25 if another PR has 25 commits). I get a commit but I want to be able to display the messages associated with it.
You don't get the commit part of the response? There's a message key in the dictionary. Maybe is it a bug in the client you're using?