summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Kubacki <michael.kubacki@microsoft.com>2025-05-12 15:08:20 -0400
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2025-05-13 12:44:57 +0000
commit607c58ef010c9952263f5e5e2553ece4dd2067bc (patch)
treee707e77dca9bcfcc4641b9c37bf3a921e0e0d704
parent399a40e5cba2ed70197ac61c8da9cf9805fb918e (diff)
downloadedk2-607c58ef010c9952263f5e5e2553ece4dd2067bc.zip
edk2-607c58ef010c9952263f5e5e2553ece4dd2067bc.tar.gz
edk2-607c58ef010c9952263f5e5e2553ece4dd2067bc.tar.bz2
.github: Compare collaborator GitHub ID's in single case
Since case of a GitHub user name may by specified differently in the `Maintainers.txt` file versus what is actually returned by the GitHub API (actual case), convert both to lowercase for comparison. Other GitHub user name inputs are directly from APIs and maintain consistent casing. Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
-rw-r--r--.github/scripts/GitHub.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/.github/scripts/GitHub.py b/.github/scripts/GitHub.py
index 052fbf8..c6de620 100644
--- a/.github/scripts/GitHub.py
+++ b/.github/scripts/GitHub.py
@@ -228,8 +228,8 @@ def add_reviewers_to_pr(
)
# A user can only be added if they are a collaborator of the repository.
- repo_collaborators = [c.login.strip() for c in repo_gh.get_collaborators() if c]
- non_collaborators = [u for u in user_names if u not in repo_collaborators]
+ repo_collaborators = [c.login.strip().lower() for c in repo_gh.get_collaborators() if c]
+ non_collaborators = [u for u in user_names if u.lower() not in repo_collaborators]
excluded_pr_reviewers = [pr_author] + current_pr_reviewers + non_collaborators
new_pr_reviewers = [u for u in user_names if u not in excluded_pr_reviewers]