Skip to content

Commit

Permalink
🐛 Exception handling
Browse files Browse the repository at this point in the history
  • Loading branch information
ebullient committed Dec 18, 2024
1 parent 2759176 commit 64c6b79
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public enum ActionType {
submitted,
synchronize,
transferred,
unassigned,
unanswered,
unlabeled,
unlocked,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ void discoverRepositories(@Observes StartupEvent ev) {

void onEvent(@RawEvent GitHubEvent event, GitHub github, DynamicGraphQLClient graphQLClient) {
ctx = ctxInstance.get();
if (event == null || event.getInstallationId() == null) {
return;
}
ctx.updateConnections(event.getInstallationId(), github, graphQLClient);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,9 @@ void doSyncTeamMembers(TeamSourceConfig config, String fullTeamName, Set<String>
Set<String> toRemove = new HashSet<>(currentLogins);
toRemove.removeAll(sourceLogins);

Log.debugf("[%s] doSyncTeamMembers: %s; add %s; remove %s", qc.getLogId(),
fullTeamName, toAdd, toRemove);

if (productionRun) {
final Set<GHUser> validate = new HashSet<>();
// Membership events will update the team cache; do nothing with the cache here.
Expand All @@ -410,8 +413,7 @@ void doSyncTeamMembers(TeamSourceConfig config, String fullTeamName, Set<String>
}
}
} catch (IOException e) {
Log.warnf("[%s] doSyncTeamMembers: failed to find, add, or remove user %s", qc.getLogId(), login);
;
Log.errorf(e, "[%s] doSyncTeamMembers: failed to find, add, or remove user %s", qc.getLogId(), login);
}
}
return null;
Expand Down

0 comments on commit 64c6b79

Please sign in to comment.