I would like to get all commit messages for separate file in github REST api. But all I got - only to get all commits for separate branch. Then I tried to get following:
http://api.github.com/users/<username>/<project>/commits/<branch>/<path/to/file>
But that didn't help also. Is this at least possible?
Try this (as described in the API docs here):
http://api.github.com/repos/:owner/:repo/commits?path=PATH_TO_FILE
e.g.
https://api.github.com/repos/izuzak/pmrpc/commits?path=README.markdown
Extra: Get commits history for one file from a specific branch
https://api.github.com/repos/izuzak/pmrpc/git/refs
object.sha
for a specific branch, e.g. refs/heads/gh-pages
sha=BRANCH_HASH
parameter:
https://api.github.com/repos/izuzak/pmrpc/commits?sha=0a8e26a92ee3101803314ee7dea6c6057ff2b862&path=apidocs.markdown