Skip to content

Commit 84e4395

Browse files
💡 use TeamsToIgnore to ignore member group (#83)
* When applicable, this results in a more consistent experience AND resolves the problem where an Org may set OrgMembers to 'NA' instead of simply leaving it blank * This also updates a debug time environment variable for VS Code so that **local** and **non production** debugging can be slightly easier...
1 parent 751a214 commit 84e4395

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

.vscode/launch.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@
1212
"internalConsoleOptions": "openOnSessionStart",
1313
"outFiles": [
1414
"${workspaceFolder}/out/**/*.js"
15-
]
15+
],
16+
"env": {
17+
"NODE_TLS_REJECT_UNAUTHORIZED": "0",
18+
}
1619
}
1720
]
1821
}

src/services/githubSync.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,8 +335,9 @@ async function syncOrg(installedGitHubClient: InstalledClient, appConfig: AppCon
335335
await Promise.all(orgMembershipPromises);
336336
}
337337

338-
let currentMembers: GitHubId[] = [];
339-
if (membersGroupName != undefined || membersGroupName != null) {
338+
let currentMembers: GitHubId[] = [];
339+
// TODO: add log message to explain group being skipped if it is included in TeamsToIgnore
340+
if (membersGroupName != undefined && membersGroupName != null && !appConfig.TeamsToIgnore.includes(membersGroupName)) {
340341
Log(`Syncing Members for ${installedGitHubClient.GetCurrentOrgName()}: ${membersGroupName}`)
341342
const currentMembersResponse = await SynchronizeOrgMembers(installedGitHubClient, membersGroupName, appConfig, orgConfig.DisplayNameToSourceMap)
342343

0 commit comments

Comments
 (0)