tags:

views:

138

answers:

1

I am wondering if it is at all possible to use GitHub's API1 to retrieve a list of commits by a given author (for a specific repository, branch). One can grab recent commits to a repository and branch (e.g. mojombo's grit repository's master branch in JSON format: http://github.com/api/v2/json/commits/list/mojombo/grit/master) but I would like to know if it is possible to filter this by author (hopefully it is just something I've missed in the documentation or is available but not documented).

So, does anyone know if something exists like http://github.com/api/v2/:format/commits/list/mojombo/grit/master/:authorname (this obviously does not work). I am also open to suggestions about generating such a list myself (via the git command). Any ideas?

[1] http://develop.github.com/

A: 

Using the API I don't think there's another way besides getting the commit list and searching for a user.

But with a cloned repository git log has a parameter that does this:

--author=<pattern>, --committer=<pattern>  Limit the commits output to ones 
with author/committer header lines that match the specified pattern (regular expression).
Mihai A