Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
vsingal-p committed Apr 2, 2024
1 parent a6ae38a commit d83f516
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 63 deletions.
34 changes: 12 additions & 22 deletions dist/431.index.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/431.index.js.map

Large diffs are not rendered by default.

34 changes: 12 additions & 22 deletions dist/676.index.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/676.index.js.map

Large diffs are not rendered by default.

28 changes: 11 additions & 17 deletions src/helpers/approvals-satisfied.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,26 +87,20 @@ const fetchTeamLogins = async (team: string) => {
return data.map(({ login }) => login);
};
const updateTeamsList = (teamsList?: string[]) => {
if (teamsList) {
return teamsList.map(team => {
if (!team.includes('/')) {
return `${context.repo.owner}/${team}`;
} else {
return team;
}
});
} else {
return undefined;
}
return teamsList?.map(team => {
if (!team.includes('/')) {
return `${context.repo.owner}/${team}`;
} else {
return team;
}
});
};

const validateTeamsList = (teamsList?: string[]) => {
if (teamsList) {
return teamsList.every(team => {
return (
teamsList?.every(team => {
const inputOrg = team.split('/')[0];
return inputOrg === context.repo.owner;
});
} else {
return true;
}
}) ?? true
);
};

0 comments on commit d83f516

Please sign in to comment.