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/
Your local Git commit email isn't connected to your account Commits must be made with an email address that is connected to your account on GitHub.com, or the GitHub-provided noreply email address provided to you in your email settings, in order to appear on your contributions graph.
On GitHub.com, navigate to the main page of the repository. On the main page of the repository, click commits to navigate to the commits page. Navigate to the commit by clicking the commit message link. To see what branch the commit is on, check the label below the commit message.
Commit your changesType a commit message describing the change you've made. To commit your staged changes, click the check mark at the top the source control side bar. Once you have committed your changes, they will automatically be pushed to your branch on GitHub.
Basically, git commit "records changes to the repository" while git push "updates remote refs along with associated objects". So the first one is used in connection with your local repository, while the latter one is used to interact with a remote repository.
Filtering the commits by author has been added to the v3 API. The author
parameter is available for the List commits on a repository action (GET /repos/:user/:repo/commits
).
After almost three years, thank you Wynn from Github!
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).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With