Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .github/scripts/GitHub.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,13 @@ def add_reviewers_to_pr(
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]
excluded_pr_reviewers = {
e.lower()
for e in [pr_author] + current_pr_reviewers + non_collaborators
}
new_pr_reviewers = [
u for u in user_names if u.lower() not in excluded_pr_reviewers
]

# Notify the admins of the repository if non-collaborators are requested.
if non_collaborators:
Expand Down
Loading