通过GitHub API的提交更改抓取文件

n_x*_*x_l 4 git github github-api

我正在尝试使用GitHub API来捕获由特定提交更改的所有文件,但是我看不到这样做的好方法。

换句话说,git show --name-only sha1GitHub API 的等效功能是什么?

Iva*_*zak 5

如果您通过Repository Commits API获取提交,则响应将包含一个files数组,其中包含已更改文件的列表:

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