I want to be able to get the total number of commits in a github repository between 2 git tags using octokit.net (Github .NET API).

Same as what the compare in github does.

有帮助吗?

解决方案

Short answer: not currently.

Longer answer: The GitHub API exposes the compare view here:

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

So you can call it like this and get the data you need:

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

If you can wait a little longer, I've started a pull request to officially support this in Octokit.net:

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

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top