3rd-party-integrations / github-team-sync

Sync GitHub teams to groups in Active Directory, LDAP, Okta, OneLogin or AzureAD when using any authentication method for GitHub.
MIT License
201 stars 67 forks source link

Remove org members without team #128

Closed Robbilie closed 2 years ago

Robbilie commented 2 years ago

Solves #127

primetheus commented 2 years ago

@Robbilie Thanks for opening this up! Can you also update the .env.example files and README?

Robbilie commented 2 years ago

sure thing!

i need your opinion on my code though, i realized that it has a tiny flaw, it runs before team members get kicked out of teams so it may take until the next scheduled run to completely remove a member from the org. changing this would mean though that i would have to do the whole iterate over installations and orgs thing after future.result() loop. that would blow up the method and thus i would probably shift it to a seperate one, but it feels like a lot of duplicate code then. any thoughts?

Robbilie commented 2 years ago

i made that code change, i think its a bit cleaner this way even though a bit more duplicated, at least it doesnt take another schedule this way. feel free to add your thoughts :)

Robbilie commented 2 years ago

@primetheus i got two more changes lined up, would be great if you could find the time to go over this :)

primetheus commented 2 years ago

@Robbilie it seems to work, but it may be expensive on massive infrastructures with 10k+ users, since it doubles the API calls. I'll do some testing this afternoon and see if we can optimize the performance a bit

VanyaBerzoi commented 2 years ago

Solves #127

https://github.com/github/github-team-sync/pull/128#issue-1234143118