chore: code formatting

This commit is contained in:
github-actions[bot]
2023-03-13 04:39:48 +00:00
parent 522b7e74b1
commit 78709320de
16 changed files with 47 additions and 32 deletions

View File

@@ -52,17 +52,16 @@ export default async function({login, data, graphql, rest, q, queries, imports,
let pushed = 0
do {
console.debug(`metrics/compute/${login}/plugins > people > retrieving ${type} after ${cursor}`)
const {[type]: {edges}} = (
type in context.sponsorships
? (await graphql(queries.people.sponsors({login: context.owner ?? login, type, size, after: cursor ? `after: "${cursor}"` : "", target: context.sponsorships[type], account})))[account]
: context.mode === "repository"
? (await graphql(queries.people.repository({login: context.owner, repository: context.repo, type, size, after: cursor ? `after: "${cursor}"` : "", account})))[account].repository
: (await graphql(queries.people({login, type, size, after: cursor ? `after: "${cursor}"` : "", account})))[account]
)
const {[type]: {edges}} = type in context.sponsorships
? (await graphql(queries.people.sponsors({login: context.owner ?? login, type, size, after: cursor ? `after: "${cursor}"` : "", target: context.sponsorships[type], account})))[account]
: context.mode === "repository"
? (await graphql(queries.people.repository({login: context.owner, repository: context.repo, type, size, after: cursor ? `after: "${cursor}"` : "", account})))[account].repository
: (await graphql(queries.people({login, type, size, after: cursor ? `after: "${cursor}"` : "", account})))[account]
cursor = edges?.[edges?.length - 1]?.cursor
result[type].push(...edges.map(({node}) => node[context.sponsorships[type]] ?? node))
pushed = edges.length
} while ((pushed) && (cursor) && ((limit === 0) || (result[type].length <= (shuffle ? 10 * limit : limit))))
}
while ((pushed) && (cursor) && ((limit === 0) || (result[type].length <= (shuffle ? 10 * limit : limit))))
}
//Shuffle
if (shuffle) {