From dacd3c85117c010e86881515b749a275c1ad762a Mon Sep 17 00:00:00 2001 From: Beyhan Veli Date: Fri, 12 Jan 2024 11:16:50 +0100 Subject: [PATCH] Compare users case insensitive The users returned by Github and listed in our contributors.yml are not equal regarding case sensitivity. That is why a case insensitive comparison is required. --- org/org_user_management.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/org/org_user_management.py b/org/org_user_management.py index ad2687ae..70eb6ccb 100644 --- a/org/org_user_management.py +++ b/org/org_user_management.py @@ -93,7 +93,8 @@ def _write_yaml_file(self, path, data): def delete_inactive_contributors(self, users_to_delete): path = f"{_SCRIPT_PATH}/contributors.yml" contributors_yaml = self._load_yaml_file(path) - contributors_yaml["contributors"] = [c for c in contributors_yaml["contributors"] if c not in users_to_delete] + users_to_delete_lower = [user.lower() for user in users_to_delete] + contributors_yaml["contributors"] = [c for c in contributors_yaml["contributors"] if c.lower() not in users_to_delete_lower] self._write_yaml_file(path, contributors_yaml) def get_inactive_users_msg(self, users_to_delete, tagusers):