Search code examples
github-apigithub-graphql

Get number of commited lines via GitHub api


The query

curl -H "Accept: application/vnd.github.cloak-preview" "https://api.github.com/search/commits?q=java" 

returns a list of commits for Java language. How can I get a number of committed lines for every item?


Solution

  • I don't see that kind of feature in the API, and I doubt it would be easily achievable, considering that involve inspecting the diff of each commit, in order to extract the committed lines (the one added/modified/removed).

    You might possibly have more data though Google BigQueries, as in this example.