From 2ea65fbf1f3e52e3c81d50a0f0798e1c13a7d696 Mon Sep 17 00:00:00 2001 From: JoshuaTheMiller Date: Sat, 11 Feb 2023 13:02:04 -0600 Subject: [PATCH] :bug: fix string comparison on invalid org team name --- source/Gttsb.Gh/Bootstrap.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/Gttsb.Gh/Bootstrap.cs b/source/Gttsb.Gh/Bootstrap.cs index f5a2cf4..5539b65 100644 --- a/source/Gttsb.Gh/Bootstrap.cs +++ b/source/Gttsb.Gh/Bootstrap.cs @@ -44,7 +44,7 @@ public static async Task StartTeamSyncAsync(IActiveDirectoryFacade activeD var org = gitHubFacade.OrgName; var groupsToSyncronize = groupDisplayNames.Where(n => !string.IsNullOrWhiteSpace(n.Key)) - .Where(n => !(n.Key == "NA" || n.Key == "na")) + .Where(n => !(n.Key == "NA" || n.Key.Equals("NA", StringComparison.InvariantCultureIgnoreCase))) .Select(g => new { Key = g.Key, @@ -68,7 +68,7 @@ public static async Task StartTeamSyncAsync(IActiveDirectoryFacade activeD usersWithSyncIssues.AddRange(memberSyncResult.UsersWithSyncIssues); } - if (!inputs.OrganizationMembersGroup.IsEmptyOrWhitespace()) + if (!inputs.OrganizationMembersGroup.IsEmptyOrWhitespace() && !inputs.OrganizationMembersGroup.Equals("NA", StringComparison.InvariantCultureIgnoreCase)) { var memberSyncResult = await groupSyncer.SyncronizeMembersAsync(org, groupsToSyncronize[inputs.OrganizationMembersGroup]); usersWithSyncIssues.AddRange(memberSyncResult.UsersWithSyncIssues);