tools/cl: Support multiple --reviewer
Enable adding more than one reviewer by passing -r multiple times. BUG=None TEST=tools/cl upload -r fmayle@google.com -r keiichiw@chromium.org -a Change-Id: Id197e3b0a1c1dda02892fce8d8951f040f255940 Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/7253479 Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org> Commit-Queue: Keiichi Watanabe <keiichiw@chromium.org> Auto-Submit: Pierre-Clément Tosi <ptosi@google.com>
This commit is contained in:
parent
5adb0859a6
commit
cc5febd799
1 changed files with 4 additions and 2 deletions
6
tools/cl
6
tools/cl
|
|
@ -217,9 +217,10 @@ def rebase():
|
|||
git(f"cherry-pick {branch_name}@{{u}}..{branch_name}").fg()
|
||||
|
||||
|
||||
@arg("-r", "--reviewer", action="append", help="(can be repeated)")
|
||||
def upload(
|
||||
dry_run: bool = False,
|
||||
reviewer: Optional[str] = None,
|
||||
reviewer: Optional[list[str]] = None,
|
||||
auto_submit: bool = False,
|
||||
submit: bool = False,
|
||||
try_: bool = False,
|
||||
|
|
@ -259,7 +260,8 @@ def upload(
|
|||
if submit:
|
||||
extra_args.append(f"l=Commit-Queue+2")
|
||||
if reviewer:
|
||||
extra_args.append(f"r={reviewer}")
|
||||
for r in reviewer:
|
||||
extra_args.append(f"r={r}")
|
||||
|
||||
git(f"push origin HEAD:refs/for/main%{','.join(extra_args)}").fg(dry_run=dry_run)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue