Skip to content

Commit

Permalink
fix: githubLoginToTeams
Browse files Browse the repository at this point in the history
  • Loading branch information
christophehurpeau committed Jun 26, 2019
1 parent 62d1d6d commit 7ad44f0
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 14 deletions.
10 changes: 6 additions & 4 deletions dist/index-node10-dev.cjs.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index-node10-dev.cjs.js.map

Large diffs are not rendered by default.

10 changes: 6 additions & 4 deletions dist/index-node10.cjs.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index-node10.cjs.js.map

Large diffs are not rendered by default.

9 changes: 5 additions & 4 deletions src/context/orgContext.ts
Expand Up @@ -39,13 +39,14 @@ const initTeamContext = async (
});

const githubLoginToTeams = new Map<string, string[]>();
getKeys(config.teams || {}).forEach((acc, teamName) => {
getKeys(config.teams || {}).forEach((teamName) => {
(config.teams as NonNullable<typeof config.teams>)[teamName].logins.forEach(
(login) => {
if (acc.has(login)) {
acc.get(login).push(teamName);
const teams = githubLoginToTeams.get(login);
if (teams) {
teams.push(teamName);
} else {
acc.set(login, [teamName]);
githubLoginToTeams.set(login, [teamName]);
}
},
);
Expand Down

0 comments on commit 7ad44f0

Please sign in to comment.