gerrit/Documentation/cmd-set-members.txt
David Ostrovsky 4adb97e1a6 Add SSH command to set group members
Add a new SSH command that allows to
- add users to groups
- remove users from groups
- include groups into groups
- exclude groups from groups

That change is based on previous work of Edwin Kempin:
https://gerrit-review.googlesource.com/#/c/30009

Bug: issue 1095
Change-Id: I9a80bc52f5a9847d4e8b4d848149167844eadd19
2013-06-14 20:30:32 +02:00

83 lines
1.9 KiB
Plaintext

gerrit set-members
==================
NAME
----
gerrit set-members - Set group members
SYNOPSIS
--------
[verse]
'ssh' -p <port> <host> 'gerrit set-members'
[--add USER ...]
[--remove USER ...]
[--include GROUP ...]
[--exclude GROUP ...]
[--]
<GROUP> ...
DESCRIPTION
-----------
Set the group members for the specified groups.
OPTIONS
-------
<GROUP>::
Required; name of the group for which the members should be set.
The members for multiple groups can be set at once by specifying
multiple groups.
--add::
-a::
A user that should be added to the specified groups. Multiple
users can be added at once by using this option multiple times.
--remove::
-r::
Remove this user from the specified groups. Multiple users can be
removed at once by using this option multiple times.
--include::
-i::
A group that should be included to the specified groups. Multiple
groups can be included at once by using this option multiple
times.
--exclude::
-e::
Exclude this group from the specified groups. Multiple groups can
be excluded at once by using this option multiple times.
The `set-members` command is processing the options in the following
order: `--remove`, `--exclude`, `--add`, `--include`
ACCESS
------
Any user who has configured an SSH key.
SCRIPTING
---------
This command is intended to be used in scripts.
EXAMPLES
--------
Add alice and bob, but remove eve from the groups my-committers and
my-verifiers.
=====
$ ssh -p 29418 review.example.com gerrit set-members \
-a alice@example.com -a bob@example.com \
-r eve@example.com my-committers my-verifiers
=====
Include the group my-friends into the group my-committers, but
exclude the included group my-testers from the group my-committers.
=====
$ ssh -p 29418 review.example.com gerrit set-members \
-i my-friends -e my-testers my-committers
=====
GERRIT
------
Part of link:index.html[Gerrit Code Review]