Changeset 206980 in webkit
- Timestamp:
- Oct 9, 2016, 10:22:09 PM (9 years ago)
- Location:
- trunk/Tools
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r206973 r206980 1 2016-10-09 Simon Fraser <simon.fraser@apple.com> 2 3 Make validate-committer-lists show inactive reviewers 4 https://bugs.webkit.org/show_bug.cgi?id=163193 5 6 Reviewed by Sam Weinig. 7 8 In preparation for updating contributors.json with the WebKit policy of retiring 9 inactive reviewers, make validate-committer-lists show the list of reviewers who 10 have not reviewed in the past year. 11 12 This list is computed by grepping the output of 'git log --since=1.year" for 13 the reviewer line, and looking up reviewers via Contributor.mentioned_in_text(), 14 which looks for full names, aliases, irc nicks and email addresses. 15 16 Support for aliases is added to Contributor. Aliases are alternates 17 or misspellings of the reviewer's name. Some common aliases were added to 18 contributors.json by manual examination of "Reviewed by" lines. 19 20 * Scripts/validate-committer-lists: 21 (CommitterListFromGit.possibly_expired_committers): 22 (CommitterListFromGit): 23 (CommitterListFromGit.possibly_inactive_reviewers): 24 (CommitterListFromGit.print_possibly_expired_committers): 25 (CommitterListFromGit.print_possibly_inactive_reviewers): 26 * Scripts/webkitpy/common/config/committers.py: 27 (Contributor.__init__): 28 (Contributor.contains_string): 29 (Contributor.mentioned_in_text): 30 (Contributor.as_dict): 31 (Committer.__init__): 32 (Reviewer.__init__): 33 (CommitterList.load_json): 34 * Scripts/webkitpy/common/config/contributors.json: 35 1 36 2016-10-09 Simon Fraser <simon.fraser@apple.com> 2 37 -
trunk/Tools/Scripts/validate-committer-lists
r206967 r206980 41 41 42 42 from webkitpy.common.config.committers import CommitterList 43 from webkitpy.common.checkout.changelog import ChangeLogEntry 43 44 from webkitpy.common.checkout.scm import Git 44 45 from webkitpy.common.net.bugzilla import Bugzilla … … 227 228 return retired_authors_and_last_commits 228 229 230 def possibly_inactive_reviewers(self, committer_list): 231 git_log_args = ['git', 'log', '--since=1.year'] 232 process = subprocess.Popen(git_log_args, stdout=subprocess.PIPE) 233 git_output, err = process.communicate() 234 235 comment_regex = re.compile(r'^Date: .+?\n+(.+?)(?:^commit |\Z)', re.MULTILINE | re.DOTALL) 236 reviewed_by_regexp = re.compile(ChangeLogEntry.reviewed_by_regexp, re.MULTILINE) 237 238 reviewers = committer_list.reviewers() 239 240 for comment in comment_regex.findall(git_output): 241 reviewer_match = reviewed_by_regexp.search(comment) 242 if reviewer_match: 243 reviewers_text = reviewer_match.group('reviewer').decode('utf-8', 'backslashreplace') 244 # reviewers might be something like "Darin Adler and Dave Hyatt". 245 # Rather than trying to fuzzy match names, find known reviewers and remove them from the list. 246 for reviewer in reviewers: 247 if reviewer.mentioned_in_text(reviewers_text): 248 reviewers.remove(reviewer) 249 break 250 251 return reviewers 252 229 253 def print_possibly_expired_committers(self, committer_list): 230 254 retired_authors_and_last_commits = self.possibly_expired_committers(committer_list) … … 238 262 self._print_three_column_row(column_widths, (str(last_commit_date), author, committer_record)) 239 263 264 def print_possibly_inactive_reviewers(self, committer_list): 265 inactive_reviewers = self.possibly_inactive_reviewers(committer_list) 266 267 column_widths = [13, 25] 268 print 269 print "Reviewers who have not reviewed within one year:" 270 for contributor in inactive_reviewers: 271 print "\"{}\" {}".format(contributor.full_name.encode("utf-8"), contributor.bugzilla_email()) 272 240 273 def print_committers_missing_from_committer_list(self, committer_list): 241 274 missing_from_contributors_json = [] … … 295 328 print """\n\nWARNING: validate-committer-lists requires a git checkout. 296 329 The following checks are disabled: 297 - List of committers ordered by last commit 330 - List of inactive committers 331 - List of inactive reviewers 298 332 - List of historical committers missing from contributors.json 299 333 """ … … 302 336 svn_committer_list = CommitterListFromGit() 303 337 svn_committer_list.print_possibly_expired_committers(committer_list) 338 svn_committer_list.print_possibly_inactive_reviewers(committer_list) 304 339 svn_committer_list.print_committers_missing_from_committer_list(committer_list) 305 340 -
trunk/Tools/Scripts/webkitpy/common/config/committers.py
r206973 r206980 39 39 40 40 class Contributor(object): 41 def __init__(self, name, email_or_emails, irc_nickname_or_nicknames=None, expertise=None):41 def __init__(self, name, email_or_emails, irc_nickname_or_nicknames=None, alias_or_aliases=None, expertise=None): 42 42 assert(name) 43 43 assert(email_or_emails) … … 49 49 self._case_preserved_emails = self.emails 50 50 self.emails = map(lambda email: email.lower(), self.emails) # Emails are case-insensitive. 51 51 52 if isinstance(irc_nickname_or_nicknames, str): 52 53 self.irc_nicknames = [irc_nickname_or_nicknames] 53 54 else: 54 55 self.irc_nicknames = irc_nickname_or_nicknames 56 57 if isinstance(alias_or_aliases, str): 58 self.aliases = [alias_or_aliases] 59 else: 60 self.aliases = alias_or_aliases 61 55 62 self.expertise = expertise 56 63 self.can_commit = False … … 85 92 if string in nickname.lower(): 86 93 return True 94 if self.aliases: 95 for alias in self.aliases: 96 if string in alias.lower(): 97 return True 87 98 for email in self.emails: 88 99 if string in email: 100 return True 101 return False 102 103 def mentioned_in_text(self, text): 104 lower_text = text.lower() 105 if self.full_name.lower() in lower_text: 106 return True 107 if self.irc_nicknames: 108 for nickname in self.irc_nicknames: 109 if nickname.lower() in lower_text: 110 return True 111 if self.aliases: 112 for alias in self.aliases: 113 if alias.lower() in lower_text: 114 return True 115 for email in self.emails: 116 if email in lower_text: 89 117 return True 90 118 return False … … 105 133 info = {"emails" : self._case_preserved_emails} 106 134 135 if self.aliases: 136 info["aliases"] = self.aliases 137 107 138 if self.can_review: 108 139 info["status"] = "reviewer" … … 120 151 121 152 class Committer(Contributor): 122 def __init__(self, name, email_or_emails, irc_nickname=None, expertise=None):123 Contributor.__init__(self, name, email_or_emails, irc_nickname, expertise)153 def __init__(self, name, email_or_emails, irc_nickname=None, alias_or_aliases=None, expertise=None): 154 Contributor.__init__(self, name, email_or_emails, irc_nickname, alias_or_aliases, expertise) 124 155 self.can_commit = True 125 156 126 157 127 158 class Reviewer(Committer): 128 def __init__(self, name, email_or_emails, irc_nickname=None, expertise=None):129 Committer.__init__(self, name, email_or_emails, irc_nickname, expertise)159 def __init__(self, name, email_or_emails, irc_nickname=None, alias_or_aliases=None, expertise=None): 160 Committer.__init__(self, name, email_or_emails, irc_nickname, alias_or_aliases, expertise) 130 161 self.can_review = True 131 162 … … 163 194 status = data.get('status') 164 195 if status == "reviewer": 165 contributor = Reviewer(name, data.get('emails'), data.get('nicks'), data.get(' expertise'))196 contributor = Reviewer(name, data.get('emails'), data.get('nicks'), data.get('aliases'), data.get('expertise')) 166 197 self._reviewers.append(contributor) 167 198 self._committers.append(contributor) 168 199 elif status == "committer": 169 contributor = Committer(name, data.get('emails'), data.get('nicks'), data.get(' expertise'))200 contributor = Committer(name, data.get('emails'), data.get('nicks'), data.get('aliases'), data.get('expertise')) 170 201 self._committers.append(contributor) 171 202 else: 172 contributor = Contributor(name, data.get('emails'), data.get('nicks'), data.get(' expertise'))203 contributor = Contributor(name, data.get('emails'), data.get('nicks'), data.get('aliases'), data.get('expertise')) 173 204 174 205 self._contributors.append(contributor) -
trunk/Tools/Scripts/webkitpy/common/config/contributors.json
r206973 r206980 446 446 }, 447 447 "Andreas Kling" : { 448 "aliases" : [ 449 "Andreas Goran Kling" 450 ], 448 451 "emails" : [ 449 452 "akling@apple.com", … … 846 849 }, 847 850 "Benjamin Poulain" : { 851 "aliases" : [ 852 "Ben Poulain" 853 ], 848 854 "emails" : [ 849 855 "benjamin@webkit.org", … … 859 865 }, 860 866 "Beth Dakin" : { 867 "aliases" : [ 868 "Deth Bakin" 869 ], 861 870 "emails" : [ 862 871 "bdakin@apple.com" … … 1130 1139 }, 1131 1140 "Chris Dumez" : { 1141 "aliases" : [ 1142 "Christophe Dumez" 1143 ], 1132 1144 "emails" : [ 1133 1145 "cdumez@apple.com", … … 1290 1302 }, 1291 1303 "Dan Bernstein" : { 1304 "aliases" : [ 1305 "mitz" 1306 ], 1292 1307 "emails" : [ 1293 1308 "mitz@webkit.org", … … 1431 1446 }, 1432 1447 "David Hyatt" : { 1448 "aliases" : [ 1449 "Dave Hyatt" 1450 ], 1433 1451 "emails" : [ 1434 1452 "hyatt@apple.com" … … 1442 1460 }, 1443 1461 "David Kilzer" : { 1462 "aliases" : [ 1463 "Dave Kilzer" 1464 ], 1444 1465 "emails" : [ 1445 1466 "ddkilzer@webkit.org", … … 1662 1683 }, 1663 1684 "Don Melton" : { 1685 "aliases" : [ 1686 "Gramps" 1687 ], 1664 1688 "emails" : [ 1665 1689 "gramps@apple.com" … … 1783 1807 }, 1784 1808 "Emil A Eklund" : { 1809 "aliases" : [ 1810 "Emil Eklund" 1811 ], 1785 1812 "emails" : [ 1786 1813 "eae@chromium.org" … … 1934 1961 }, 1935 1962 "Filip Pizlo" : { 1963 "aliases" : [ 1964 "Phil Pizlo" 1965 ], 1936 1966 "emails" : [ 1937 1967 "fpizlo@apple.com" … … 2048 2078 }, 2049 2079 "Geoffrey Garen" : { 2080 "aliases" : [ 2081 "Geoff Garen" 2082 ], 2050 2083 "emails" : [ 2051 2084 "ggaren@apple.com" … … 2276 2309 }, 2277 2310 "Holger Freyther" : { 2311 "aliases" : [ 2312 "Holger Hans Peter Freyther" 2313 ], 2278 2314 "emails" : [ 2279 2315 "zecke@selfish.org", … … 2884 2920 }, 2885 2921 "Jon Honeycutt" : { 2922 "aliases" : [ 2923 "John Honeycutt" 2924 ], 2886 2925 "emails" : [ 2887 2926 "jhoneycutt@apple.com" … … 2987 3026 }, 2988 3027 "Joseph Pecoraro" : { 3028 "aliases" : [ 3029 "Joe Pecoraro" 3030 ], 2989 3031 "emails" : [ 2990 3032 "joepeck@webkit.org", … … 3213 3255 }, 3214 3256 "Kenneth Rohde Christiansen" : { 3257 "aliases" : [ 3258 "Kenneth Christiansen" 3259 ], 3215 3260 "emails" : [ 3216 3261 "kenneth@webkit.org", … … 3228 3273 }, 3229 3274 "Kenneth Russell" : { 3275 "aliases" : [ 3276 "Ken Russell" 3277 ], 3230 3278 "emails" : [ 3231 3279 "kbr@google.com", … … 4065 4113 }, 4066 4114 "Myles C. Maxfield" : { 4115 "aliases" : [ 4116 "Myles Maxfield" 4117 ], 4067 4118 "emails" : [ 4068 4119 "mmaxfield@apple.com" … … 4178 4229 }, 4179 4230 "Nikolas Zimmermann" : { 4231 "aliases" : [ 4232 "Niko Zimmermann" 4233 ], 4180 4234 "emails" : [ 4181 4235 "zimmermann@kde.org", … … 5148 5202 }, 5149 5203 "Tim Horton" : { 5204 "aliases" : [ 5205 "Timothy Horton" 5206 ], 5150 5207 "emails" : [ 5151 5208 "thorton@apple.com", … … 5173 5230 }, 5174 5231 "Timothy Hatcher" : { 5232 "aliases" : [ 5233 "Tim Hatcher" 5234 ], 5175 5235 "emails" : [ 5176 5236 "timothy@apple.com", … … 5675 5735 }, 5676 5736 "Zoltan Herczeg" : { 5737 "aliases" : [ 5738 "Zolt\u00e1n Herczeg" 5739 ], 5677 5740 "emails" : [ 5678 5741 "zherczeg@webkit.org",
Note:
See TracChangeset
for help on using the changeset viewer.