From 7449f2ba9fe1a4ae680e3a6762622f699f02f573 Mon Sep 17 00:00:00 2001 From: Erin Schnabel Date: Sun, 9 Jun 2024 20:36:41 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20no=20email=20if=20no=20changes?= =?UTF-8?q?=20in=20team=20sync=20dry=20run?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../commonhaus/automation/admin/github/TeamMemberSync.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cf-admin-bot/src/main/java/org/commonhaus/automation/admin/github/TeamMemberSync.java b/cf-admin-bot/src/main/java/org/commonhaus/automation/admin/github/TeamMemberSync.java index de50484..f6b7835 100644 --- a/cf-admin-bot/src/main/java/org/commonhaus/automation/admin/github/TeamMemberSync.java +++ b/cf-admin-bot/src/main/java/org/commonhaus/automation/admin/github/TeamMemberSync.java @@ -286,6 +286,10 @@ void doSyncTeamMembers(TeamSourceConfig config, String fullTeamName, Set finalLogins.addAll(toAdd); finalLogins.removeAll(toRemove); + if (toAdd.isEmpty() && toRemove.isEmpty()) { + // no action required + return; + } Logins allLogins = new Logins(currentLogins, toAdd, toRemove, finalLogins); sendDryRunEmail(fullTeamName, allLogins, dryRunEmail); }