Skip to content

Commit 607c58e

Browse files
makubackimergify[bot]
authored andcommitted
.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 <[email protected]>
1 parent 399a40e commit 607c58e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/scripts/GitHub.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,8 @@ def add_reviewers_to_pr(
228228
)
229229

230230
# A user can only be added if they are a collaborator of the repository.
231-
repo_collaborators = [c.login.strip() for c in repo_gh.get_collaborators() if c]
232-
non_collaborators = [u for u in user_names if u not in repo_collaborators]
231+
repo_collaborators = [c.login.strip().lower() for c in repo_gh.get_collaborators() if c]
232+
non_collaborators = [u for u in user_names if u.lower() not in repo_collaborators]
233233

234234
excluded_pr_reviewers = [pr_author] + current_pr_reviewers + non_collaborators
235235
new_pr_reviewers = [u for u in user_names if u not in excluded_pr_reviewers]

0 commit comments

Comments
 (0)