Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(208)

Unified Diff: presubmit_canned_checks.py

Issue 215153004: For determining OWNERS, drop reviewers specified via '-r' that aren't in email address format. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Drop non-email addresses instead Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/presubmit_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: presubmit_canned_checks.py
diff --git a/presubmit_canned_checks.py b/presubmit_canned_checks.py
index a48a0c627de361c6927477c7734bf2b7ab29a543..878ee70a68ff71b12bed82dd3082a90cae7219fd 100644
--- a/presubmit_canned_checks.py
+++ b/presubmit_canned_checks.py
@@ -859,7 +859,9 @@ def _ReviewersFromChange(change):
reviewers.update(set([r.strip() for r in change.R.split(',')]))
if change.TBR:
reviewers.update(set([r.strip() for r in change.TBR.split(',')]))
- return reviewers
+
+ # Drop reviewers that aren't specified in email address format.
+ return set(reviewer for reviewer in reviewers if '@' in reviewer)
def _RietveldOwnerAndReviewers(input_api, email_regexp, approval_needed=False):
« no previous file with comments | « no previous file | tests/presubmit_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698