Commit d105249d authored by Aaron Gable's avatar Aaron Gable Committed by Commit Bot

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/506489Reviewed-by: 's avatarAndrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>
parent 704be878
......@@ -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])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment