Don't add WATCHLIST CCs on private CLs

Many WATCHLIST and codereview.settings files contain
large public email lists, which defeats the purpose
of private reviews.

R=tandrii@chromium.org

Bug: 721880
Change-Id: Ibb3f314f735b783e628f8cc1fc22c74e0df59f1c
Reviewed-on: https://chromium-review.googlesource.com/506489
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>
changes/89/506489/2
Aaron Gable 8 years ago committed by Commit Bot
parent 704be87816
commit d105249dda

@ -3018,7 +3018,10 @@ class _GerritChangelistImpl(_ChangelistCodereviewBase):
reviewers = sorted(change_desc.get_reviewers())
# Add cc's from the CC_LIST and --cc flag (if any).
cc = self.GetCCList().split(',')
if not options.private:
cc = self.GetCCList().split(',')
else:
cc = []
if options.cc:
cc.extend(options.cc)
cc = filter(None, [email.strip() for email in cc])

Loading…
Cancel
Save