blob: f6248c68a6831325ec00dc141b228e0d82f772ab [file] [log] [blame]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001= gerrit set-reviewers
Conley Owensf3ea0ab2011-06-10 11:34:34 -07002
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08003== NAME
David Shevitzc47f2362018-09-27 10:55:35 -07004gerrit set-reviewers - Add or remove reviewers to a change.
Conley Owensf3ea0ab2011-06-10 11:34:34 -07005
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08006== SYNOPSIS
Michael Ochmanne2d76a12016-06-23 17:07:37 +02007[verse]
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -08008--
Michael Ochmanne2d76a12016-06-23 17:07:37 +02009_ssh_ -p <port> <host> _gerrit set-reviewers_
Edwin Kempin73b26982012-07-16 13:53:22 +020010 [--project <PROJECT> | -p <PROJECT>]
11 [--add <REVIEWER> ... | -a <REVIEWER> ...]
12 [--remove <REVIEWER> ... | -r <REVIEWER> ...]
Conley Owensf3ea0ab2011-06-10 11:34:34 -070013 [--]
Dave Borowitz0be8b712015-10-28 09:57:15 -040014 {CHANGE-ID}...
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -080015--
Conley Owensf3ea0ab2011-06-10 11:34:34 -070016
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080017== DESCRIPTION
Conley Owensf3ea0ab2011-06-10 11:34:34 -070018Adds or removes reviewers to the specified change, sending email
19notifications when changes are made.
20
Dave Borowitz0be8b712015-10-28 09:57:15 -040021Changes can be specified in the
22link:rest-api-changes.html#change-id[same format] supported by the REST
Hector Oswaldo Caballero61610882017-10-18 20:16:30 -040023API, as well as with the commit SHA-1 (at least the 7 first characters).
Conley Owensf3ea0ab2011-06-10 11:34:34 -070024
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080025== OPTIONS
Conley Owensf3ea0ab2011-06-10 11:34:34 -070026
27--project::
28-p::
29 Name of the project the intended change is contained within. This
David Pursehouse2c6f6382014-09-04 13:06:19 +090030 option must be supplied before Change-Id in order to take effect.
Luca Milanesio0995aa72019-04-29 13:48:46 +010031 Please note that the project specified must be active.
32
33 If omitted, the impacted changes can be from different projects and
34 the current user needs to be authorized to set reviewers to all of them.
Conley Owensf3ea0ab2011-06-10 11:34:34 -070035
36--add::
37-a::
Edwin Kempin5e65d9b2011-07-08 07:35:48 +020038 A user that should be added as reviewer to the change or a group
39 for which all members should be added as reviewers to the change.
40 Multiple users and groups can be added at once as reviewers by
41 using this option multiple times.
Conley Owensf3ea0ab2011-06-10 11:34:34 -070042
43--remove::
44-r::
Edwin Kempin5e65d9b2011-07-08 07:35:48 +020045 Remove this user from the reviewer list of the change. Multiple
46 users can be removed at once from the reviewer list by using this
47 option multiple times.
Conley Owensf3ea0ab2011-06-10 11:34:34 -070048
49--help::
50-h::
51 Display site-specific usage information
52
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080053== ACCESS
Gert van Dijkdc4f8d12017-08-27 21:14:23 +020054Any user who has SSH access to Gerrit.
Conley Owensf3ea0ab2011-06-10 11:34:34 -070055
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080056== SCRIPTING
Conley Owensf3ea0ab2011-06-10 11:34:34 -070057This command is intended to be used in scripts.
58
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080059== EXAMPLES
Conley Owensf3ea0ab2011-06-10 11:34:34 -070060
61Add reviewers alice and bob, but remove eve from change Iac6b2ac2.
Michael Ochmannb99feab2016-07-06 14:10:22 +020062----
David Shevitzc47f2362018-09-27 10:55:35 -070063$ ssh -p 29418 review.example.com gerrit set-reviewers \
64 -a alice@example.com -a bob@example.com \
65 -r eve@example.com \
66 Iac6b2ac2
Michael Ochmannb99feab2016-07-06 14:10:22 +020067----
Conley Owensf3ea0ab2011-06-10 11:34:34 -070068
69Add reviewer elvis to old-style change id 1935 specifying that the change is in project "graceland"
Michael Ochmannb99feab2016-07-06 14:10:22 +020070----
David Shevitzc47f2362018-09-27 10:55:35 -070071$ ssh -p 29418 review.example.com gerrit set-reviewers \
72 --project graceland \
73 -a elvis@example.com \
74 1935
Michael Ochmannb99feab2016-07-06 14:10:22 +020075----
Conley Owensf3ea0ab2011-06-10 11:34:34 -070076
Edwin Kempin5e65d9b2011-07-08 07:35:48 +020077Add all project owners as reviewers to change Iac6b2ac2.
Michael Ochmannb99feab2016-07-06 14:10:22 +020078----
David Shevitzc47f2362018-09-27 10:55:35 -070079$ ssh -p 29418 review.example.com gerrit set-reviewers \
80 -a "'Project Owners'" \
81 Iac6b2ac2
Michael Ochmannb99feab2016-07-06 14:10:22 +020082----
Edwin Kempin5e65d9b2011-07-08 07:35:48 +020083
Owen Li69e4ac22017-10-16 13:05:27 -040084Add all project owners as reviewers to commit 13dff08acca571b22542ebd2e31acf4572ea0b86.
85----
David Shevitzc47f2362018-09-27 10:55:35 -070086$ ssh -p 29418 review.example.com gerrit set-reviewers \
87 -a "'Project Owners'" \
88 13dff08acca571b22542ebd2e31acf4572ea0b86
Owen Li69e4ac22017-10-16 13:05:27 -040089----
90
Conley Owensf3ea0ab2011-06-10 11:34:34 -070091GERRIT
92------
93Part of link:index.html[Gerrit Code Review]
Yuxuan 'fishy' Wang99cb68d2013-10-31 17:26:00 -070094
95SEARCHBOX
96---------