Skip to content

Commit

Permalink
🐛 fix string comparison on invalid org team name
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaTheMiller committed Feb 11, 2023
1 parent 2bae390 commit 2ea65fb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/Gttsb.Gh/Bootstrap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public static async Task<bool> 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,
Expand All @@ -68,7 +68,7 @@ public static async Task<bool> 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);
Expand Down

0 comments on commit 2ea65fb

Please sign in to comment.