Commit b1c08f6c authored by Gavin Mak's avatar Gavin Mak Committed by LUCI CQ

Notify if a change auto-CCs more than 100 users

When uploading a large-scale change, many users are automatically CC'ed
on a change. This adds a warning if this is the case and links to a more
appropriate approval for a large-scale change.

Bug: 1194514
Change-Id: Icd336ebdffbccbc9f30a89a33e244a788a768cfa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2798963Reviewed-by: 's avatarJosip Sokcevic <sokcevic@google.com>
Commit-Queue: Gavin Mak <gavinmak@google.com>
parent 053a717f
......@@ -2333,6 +2333,13 @@ class Changelist(object):
# the initial upload, the CL is private, or auto-CCing has ben disabled.
if not (self.GetIssue() or options.private or options.no_autocc):
cc = self.GetCCList().split(',')
if len(cc) > 100:
lsc = ('https://chromium.googlesource.com/chromium/src/+/HEAD/docs/'
'process/lsc/lsc_workflow.md')
print('WARNING: This will auto-CC %s users.' % len(cc))
print('LSC may be more appropriate: %s' % lsc)
print('You can also use the --no-autocc flag to disable auto-CC.')
confirm_or_exit(action='continue')
# Add cc's from the --cc flag.
if options.cc:
cc.extend(options.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