Skip to content

Commit edc284a

Browse files
committed
Update GitHub team synchronization logic to use GitHub organization members for validation
1 parent 416817d commit edc284a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

arthur/exts/github/management.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -340,13 +340,13 @@ async def _sync_github_teams(
340340
],
341341
) -> tuple[int, int, int]:
342342
"""Dry-run GitHub team membership synchronisation with Keycloak."""
343-
keycloak_identities, _, resolved_keycloak_logins_by_id, _, _ = common_info
343+
keycloak_identities, github_org_members, resolved_keycloak_logins_by_id, _, _ = common_info
344344
ignored_normalised = self._ignored_github_users_normalised()
345345
keycloak_to_github = {
346346
keycloak_username: resolved_keycloak_logins_by_id[identity["user_id"].strip()]
347347
for keycloak_username, identity in keycloak_identities.items()
348348
if identity.get("user_id")
349-
and identity["user_id"].strip() in resolved_keycloak_logins_by_id
349+
and identity["user_id"].strip() in github_org_members
350350
and self._normalise_login(resolved_keycloak_logins_by_id[identity["user_id"].strip()])
351351
not in ignored_normalised
352352
}

0 commit comments

Comments
 (0)