Title: [293034] trunk/Tools
Revision
293034
Author
[email protected]
Date
2022-04-19 13:31:44 -0700 (Tue, 19 Apr 2022)

Log Message

[ews-build.webkit.org] GitHub usernames are case insensitive
https://bugs.webkit.org/show_bug.cgi?id=239509
<rdar://problem/91971337>

Reviewed by Aakash Jain.

* Tools/CISupport/ews-build/steps.py:
(GitHub.email_for_owners): Treat all GitHub usernames as lowercase.
(Contributors.load): Ditto.
(ValidateCommitterAndReviewer.is_reviewer): Ditto.
(ValidateCommitterAndReviewer.is_committer): Ditto.
(ValidateCommitterAndReviewer.full_name_from_email): Ditto.
(AddReviewerMixin.gitCommitEnvironment): Ditto.
(AddAuthorToCommitMessage.author): Ditto.

Canonical link: https://commits.webkit.org/249773@main

Modified Paths

Diff

Modified: trunk/Tools/CISupport/ews-build/steps.py (293033 => 293034)


--- trunk/Tools/CISupport/ews-build/steps.py	2022-04-19 20:27:10 UTC (rev 293033)
+++ trunk/Tools/CISupport/ews-build/steps.py	2022-04-19 20:31:44 UTC (rev 293034)
@@ -133,7 +133,7 @@
         if not owners:
             return None, 'No owners defined, so email cannot be extracted'
         contributors, errors = Contributors.load(use_network=False)
-        return contributors.get(owners[0], {}).get('email'), errors
+        return contributors.get(owners[0].lower(), {}).get('email'), errors
 
 
 class GitHubMixin(object):
@@ -462,7 +462,7 @@
                 bugzilla_email = emails[0].lower()  # We're requiring that the first email is the primary bugzilla email
                 contributors[bugzilla_email] = {'name': name, 'status': value.get('status')}
             if github_username and name and emails:
-                contributors[github_username] = dict(
+                contributors[github_username.lower()] = dict(
                     name=name,
                     status=value.get('status'),
                     email=emails[0].lower(),
@@ -1534,15 +1534,15 @@
         self.descriptionDone = reason
 
     def is_reviewer(self, email):
-        contributor = self.contributors.get(email)
+        contributor = self.contributors.get(email.lower())
         return contributor and contributor['status'] == 'reviewer'
 
     def is_committer(self, email):
-        contributor = self.contributors.get(email)
+        contributor = self.contributors.get(email.lower())
         return contributor and contributor['status'] in ['reviewer', 'committer']
 
     def full_name_from_email(self, email):
-        contributor = self.contributors.get(email)
+        contributor = self.contributors.get(email.lower())
         if not contributor:
             return ''
         return contributor.get('name')
@@ -4771,8 +4771,8 @@
 
         contributors, _ = Contributors.load(use_network=False)
         return dict(
-            GIT_COMMITTER_NAME=contributors.get(owners[0], {}).get('name', 'EWS'),
-            GIT_COMMITTER_EMAIL=contributors.get(owners[0], {}).get('email', FROM_EMAIL),
+            GIT_COMMITTER_NAME=contributors.get(owners[0].lower(), {}).get('name', 'EWS'),
+            GIT_COMMITTER_EMAIL=contributors.get(owners[0].lower(), {}).get('email', FROM_EMAIL),
             FILTER_BRANCH_SQUELCH_WARNING='1',
         )
 
@@ -4839,8 +4839,8 @@
             if not candidate:
                 continue
 
-            name = contributors.get(candidate, {}).get('name', None)
-            email = contributors.get(candidate, {}).get('email', None)
+            name = contributors.get(candidate.lower(), {}).get('name', None)
+            email = contributors.get(candidate.lower(), {}).get('email', None)
             if name and email:
                 return name, email
 

Modified: trunk/Tools/ChangeLog (293033 => 293034)


--- trunk/Tools/ChangeLog	2022-04-19 20:27:10 UTC (rev 293033)
+++ trunk/Tools/ChangeLog	2022-04-19 20:31:44 UTC (rev 293034)
@@ -1,3 +1,20 @@
+2022-04-19  Jonathan Bedard  <[email protected]>
+
+        [ews-build.webkit.org] GitHub usernames are case insensitive
+        https://bugs.webkit.org/show_bug.cgi?id=239509
+        <rdar://problem/91971337>
+
+        Reviewed by Aakash Jain.
+
+        * CISupport/ews-build/steps.py:
+        (GitHub.email_for_owners): Treat all GitHub usernames as lowercase.
+        (Contributors.load): Ditto.
+        (ValidateCommitterAndReviewer.is_reviewer): Ditto.
+        (ValidateCommitterAndReviewer.is_committer): Ditto.
+        (ValidateCommitterAndReviewer.full_name_from_email): Ditto.
+        (AddReviewerMixin.gitCommitEnvironment): Ditto.
+        (AddAuthorToCommitMessage.author): Ditto.
+
 2022-04-19  Wenson Hsieh  <[email protected]>
 
         [iOS] Text selection flickers when inserting text using dictation
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to