diff --git a/api/anubis/github/team.py b/api/anubis/github/team.py index 2b9016ed2..b2eedf15c 100644 --- a/api/anubis/github/team.py +++ b/api/anubis/github/team.py @@ -4,7 +4,7 @@ def list_github_team_members(org: str, team: str) -> list[str]: return [ user['login'] - for user in github_rest(f"/orgs/{org}/teams/{team}/members") + for user in github_rest(f"/orgs/{org}/teams/{team}/members?per_page=100") if 'login' in user ] diff --git a/api/anubis/jobs/daily_reaper.py b/api/anubis/jobs/daily_reaper.py index 0b2bf31b2..af0a6b336 100644 --- a/api/anubis/jobs/daily_reaper.py +++ b/api/anubis/jobs/daily_reaper.py @@ -63,8 +63,12 @@ def reap_github_admin_teams(): accounted_for_members.add(user.github_username) + unaccounted_for_members = set(members).difference(accounted_for_members) + logger.info(f'{members=}\n{accounted_for_members=}') + logger.info(f'members-accounted_for_members={unaccounted_for_members}') + # Remove unaccounted for members - for github_username in set(members).difference(accounted_for_members): + for github_username in unaccounted_for_members: remote_github_team_member(course.github_org, course.github_ta_team_slug, github_username)