我正在尝试使用REST API监控Gerrit中的用户提交活动(初始更改提交或修补)。
现在我有一个工作示例,可以使用以下方式获取每位用户的所有更改:“更改/?q =所有者:”,并根据最新的更改创建日期列出每个用户的一项更改。问题是这种方法错过了两件事:
相反,我想在Gerrit中创建一个查询,例如“为用户joe提供所有活动”,并查看最新初始提交或补丁活动的结果。
可以这样做吗?
答案 0 :(得分:1)
尝试使用"更改/?q =提交者:xxxxx"代替:
committer:'COMMITTER'
Changes where 'COMMITTER' is the committer of the current patch set.
查看Gerrit documentation中的更多信息。
答案 1 :(得分:0)
Thanks Marcelo, you pointed me in the right direction. But I found that "owner" and "author" often is the same. But "committer" was the one that I needed. This catches both my number 1 and 2 issue!
Also if you want the commit date you have to add some options to your query:
changes/?q=committer:<USERID>&o=CURRENT_REVISION&o=CURRENT_COMMIT