From 607c58ef010c9952263f5e5e2553ece4dd2067bc Mon Sep 17 00:00:00 2001 From: Michael Kubacki Date: Mon, 12 May 2025 15:08:20 -0400 Subject: [PATCH] .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 --- .github/scripts/GitHub.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/scripts/GitHub.py b/.github/scripts/GitHub.py index 052fbf8428..c6de620a05 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]