Github API - 作者提交

时间:2009-11-06 14:37:18

标签: github

我想知道是否可以使用GitHub的API 1 来检索给定作者的提交列表(对于特定的存储库,分支)。人们可以抓住最近提交到存储库和分支(例如mojombo的grit存储库的JSON格式的主分支:http://github.com/api/v2/json/commits/list/mojombo/grit/master)但是我想知道是否有可能通过作者过滤它(希望它只是我的'在文档中遗漏或可用但未记录在案。)

那么,有没有人知道是否存在像http://github.com/api/v2/ :format / commits / list / mojombo / grit / master / :authorname这样的东西(这显然不起作用)。我也对自己(通过git命令)生成这样一个列表的建议持开放态度。有任何想法吗?

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

2 个答案:

答案 0 :(得分:9)

2012年8月更新

已按作者过滤提交已添加到v3 APIauthor参数适用于List commits on a repository操作(GET /repos/:user/:repo/commits)。

差不多三年后,谢谢Github的Wynn!

答案 1 :(得分:4)

使用API​​我认为除了获取提交列表和搜索用户之外还有另一种方法。

但是使用克隆的存储库 git log 有一个参数可以执行此操作:

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