首先确保更改存在于 Gerrit 上:
ssh -p <port> <user>@<host> gerrit query 'status:open project:<project_name> owner:self'
输出将是这样的:
change I373eb10e309f5a7dbec6c7a0530fdde6c0036a1a
project: project_name
branch: branch_name
id: I373eb10e309f5a7dbec6c7a0530fdde6c0036a1a
number: 127860
subject: commit msg
owner:
name: user
email: user@example.com
username: user_name
url: https://host/127860
createdOn: 2013-11-05 11:40:31 EST
lastUpdated: 2013-11-05 12:06:48 EST
sortKey: 0028e8220001f374
open: true
status: NEW
type: stats
rowCount: 1
runTimeMilliseconds: 24
然后如果存在changeId
(I373eb10e309f5a7dbec6c7a0530fdde6c0036a1a) 和number
(127860) 并且commit hash
可以用来设置审阅者:
ssh -p <port> <user>@<host> gerrit set-reviewers --project "<project_name>" -a user1@example.com I373eb10e309f5a7dbec6c7a0530fdde6c0036a1a
更多信息可以在这里找到