diff --git a/source/plugins/languages/analyzers.mjs b/source/plugins/languages/analyzers.mjs index f8963ef5..d461fdfe 100644 --- a/source/plugins/languages/analyzers.mjs +++ b/source/plugins/languages/analyzers.mjs @@ -21,6 +21,7 @@ export async function indepth({login, data, imports, repositories, gpg}, {skippe } else console.debug(`metrics/compute/${login}/plugins > languages > skipping import of gpg ${id}`) + } catch (error) { console.debug(`metrics/compute/${login}/plugins > languages > indepth > an error occured while importing gpg ${id}, skipping...`) @@ -209,9 +210,11 @@ async function analyze({login, imports, data}, {results, path, categories = ["pr if (results.verified) { const sha = line.match(/[0-9a-f]{40}/)?.[0] if (sha) { - pending.push(imports.run(`git verify-commit ${sha}`, {cwd:path, env:{LANG:"en_GB"}}, {log:false, prefixed:false}) - .then(() => results.verified.signature++) - .catch(() => null)) + pending.push( + imports.run(`git verify-commit ${sha}`, {cwd:path, env:{LANG:"en_GB"}}, {log:false, prefixed:false}) + .then(() => results.verified.signature++) + .catch(() => null), + ) } } results.commits++ diff --git a/tests/mocks/api/github/rest/users/listGpgKeysForUser.mjs b/tests/mocks/api/github/rest/users/listGpgKeysForUser.mjs index 1103b2f6..e5329d20 100644 --- a/tests/mocks/api/github/rest/users/listGpgKeysForUser.mjs +++ b/tests/mocks/api/github/rest/users/listGpgKeysForUser.mjs @@ -16,10 +16,10 @@ export default function({ faker }, target, that, [{ username }]) { emails: [ { email: faker.internet.email(), - verified: true - } - ] - } + verified: true, + }, + ], + }, ], }) }