Commit ac34821d authored by Edward Lesmes's avatar Edward Lesmes Committed by LUCI CQ

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/+/2679763Reviewed-by: 's avatarJosip Sokcevic <sokcevic@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
Auto-Submit: Edward Lesmes <ehmaldonado@chromium.org>
parent 110823ba
......@@ -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
......
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