Github API - commits by author

前端 未结 2 1670
梦如初夏
梦如初夏 2021-02-20 15:27

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 recen

相关标签:
2条回答
  • 2021-02-20 16:03

    Update August 2012

    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!

    0 讨论(0)
  • 2021-02-20 16:12

    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).
    
    0 讨论(0)
提交回复
热议问题