refactor: remove duplicate dependency names in warning (#24992)

This commit is contained in:
Jamie Tanna 2023-10-03 13:54:18 +01:00 committed by GitHub
parent 3c592a236c
commit adca94e964
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -50,8 +50,9 @@ export function checkGithubToken(
'github-token-required-warning-logged' 'github-token-required-warning-logged'
); );
if (!warningLogged) { if (!warningLogged) {
const withoutDuplicates = [...new Set(githubDeps)];
logger.warn( logger.warn(
{ githubDeps }, { githubDeps: withoutDuplicates },
`GitHub token is required for some dependencies` `GitHub token is required for some dependencies`
); );
memCache.set('github-token-required-warning-logged', true); memCache.set('github-token-required-warning-logged', true);