presubmit: Make email_regexp argument optional.

Make email_regexp argument to GetCodeReviewOwnerAndReviewers
optional. This will make it possible to remove it from
downstream PRESUBMIT.py scripts that pass it.

Change-Id: I45168c1f4137e7e797b30d050e4ee82f6e26daf3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2679763
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
Auto-Submit: Edward Lesmes <ehmaldonado@chromium.org>
changes/63/2679763/5
Edward Lesmes 4 years ago committed by LUCI CQ
parent 110823ba4d
commit ac34821d37

@ -1145,7 +1145,7 @@ def CheckOwners(
affected_files = set([f.LocalPath() for f in
input_api.change.AffectedFiles(file_filter=source_file_filter)])
owner_email, reviewers = GetCodereviewOwnerAndReviewers(
input_api, None, approval_needed=input_api.is_committing)
input_api, approval_needed=input_api.is_committing)
owner_email = owner_email or input_api.change.author_email
@ -1194,7 +1194,8 @@ def CheckOwners(
return []
def GetCodereviewOwnerAndReviewers(input_api, _email_regexp, approval_needed):
def GetCodereviewOwnerAndReviewers(
input_api, _email_regexp=None, approval_needed=True):
"""Return the owner and reviewers of a change, if any.
If approval_needed is True, only reviewers who have approved the change

Loading…
Cancel
Save