如何使用octokit.net获取2个git标签之间的提交数量?

Joh*_*ons 5 .net octokit

我希望能够使用octokit.net(Github .NET API)获取 2个git标签之间的github存储库中的提交总数.

与github中的比较相同.

Bre*_*ter 2

简短回答:目前还没有。

更长的答案:GitHub API 在此处公开比较视图:

http://developer.github.com/v3/repos/commits/#compare-two-commits

所以你可以这样调用它并获取你需要的数据:

https://api.github.com/repos/octokit/octokit.net/compare/master...my-cool-branch

如果您可以再等一下,我已经在 Octokit.net 中发起了一个拉取请求来正式支持此功能:

https://github.com/octokit/octokit.net/pull/428