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

Null Return on Group scrubs a github team

jerick1976 opened this issue · 5 comments

We experienced an issue within our AD environment where the sync script hit a heavily loaded AD server. The result was a query return of zero users for a group that had multiple users in it. The script then proceeded to remove all of the users from the GitHub team.

On the next run the script hit a lightly loaded AD server and repopulated the team but the damage was done.

The request here is to add a check for a null list. If the list is empty, report an error and proceed to the next sync instead of stripping the users from the GitHub team.

This looks like it's due to #5.

We can probably add an option to skip null responses... maybe -n|--skip-null or something of the like... that way existing functionality can remain for those who want it, and when we want empty groups to be ignored we can do that

@jerick1976 I've refactored the script to run as a GitHub App in #33. I need to add more checks in, but the CHANGE_THRESHOLD should help with this issue

Closing. If further functionality is requested please re-open