Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Grab files changed by commit from GitHub API

I am trying to use the GitHub API to grab all files changed by a particular commit, but I don't see a good way of doing it.

In other words, whats the equivalent of git show --name-only sha1 in the GitHub API?

like image 710
n_x_l Avatar asked Jun 03 '14 09:06

n_x_l


People also ask

How can I tell which files were changed in a commit?

To find out which files changed in a given commit, use the git log --raw command.


1 Answers

If you fetch the commit via the Repository Commits API, the response will include a files array with the list of changed files:

https://developer.github.com/v3/repos/commits/#get-a-single-commit

like image 147
Ivan Zuzak Avatar answered Oct 13 '22 00:10

Ivan Zuzak