如何使用API 获取Github存储库的所有统计信息?

问题描述 投票:2回答:1

我希望使用Github API实现类似git log --stat的功能。

我想获取存储库中发生的所有提交以及在该特定提交中更改的文件。

我应该如何使用Github API进行此操作?

python git api github github-api
1个回答
2
投票

首先抓住https://api.github.com/repos/:owner/:project/commits的提交

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

然后,您可以使用提交API来获取更改的文件。 https://developer.github.com/v3/repos/commits/#get-a-single-commit

© www.soinside.com 2019 - 2024. All rights reserved.