2

I want to write a simple java program or client which can get count of all the commits done by users.

How can I write it? Ie, How to use Github APi's in our code so I get the right result?
There are some API's present, but can somebody give example as to how to use it in java client?

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
Mohit Gupta
  • 215
  • 5
  • 7
  • I was going through githib but was unable to get any java apis will try org.eclipse.egit.github.core (it has a Contributor object) .. – Mohit Gupta Jun 22 '15 at 18:34

1 Answers1

1

I explained before that counting all the commits of a repo isn't available in GitHub API for commits.

However, the GitHub API for Statistics proposes a contributor call with a total field which can be interesting.

total

The Total number of commits authored by the contributor.

From the GitHub libraries pages, you can call this API in Java with:

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250