7

I want to achieve something like git log --stat achieves using the Github API.

I want to get all the commits that occurred in a repository along with the files that were changed in that particular commit.

How should I go about doing this with the Github API?

Ankit Vadehra
  • 157
  • 1
  • 11
  • 2
    Possible duplicate of [Commit history on remote repository](http://stackoverflow.com/questions/13941976/commit-history-on-remote-repository) – iltempo Dec 12 '15 at 15:45
  • No, not really. Github has its own privacy setting. It's not technically a remote-git host. – Ankit Vadehra Dec 12 '15 at 16:00
  • The security settings are implemented in protocol level. There is nothing special about GitHub as a remote host. – iltempo Dec 13 '15 at 11:41

1 Answers1

6

First grab the commits from https://api.github.com/repos/:owner/:project/commits

curl -i https://api.github.com/repos/masnun/torrent-tweeter/commits

Then you can use the commits API to get the changed files. https://developer.github.com/v3/repos/commits/#get-a-single-commit

masnun
  • 11,635
  • 4
  • 39
  • 50