Add repositories_batch option

This commit is contained in:
lowlighter
2021-06-22 19:28:49 +02:00
parent a46284ae76
commit 78a7c97f20
4 changed files with 22 additions and 10 deletions

View File

@@ -18,7 +18,7 @@ export default async function({login, q, imports, graphql, data, account, querie
let pushed = 0
do {
console.debug(`metrics/compute/${login}/plugins > notable > retrieving contributed repositories after ${cursor}`)
const {user:{repositoriesContributedTo:{edges}}} = await graphql(queries.notable.contributions({login, after:cursor ? `after: "${cursor}"` : "", repositories:100}))
const {user:{repositoriesContributedTo:{edges}}} = await graphql(queries.notable.contributions({login, after:cursor ? `after: "${cursor}"` : "", repositories:data.shared["repositories.batch"] || 100}))
cursor = edges?.[edges?.length - 1]?.cursor
edges
.filter(({node}) => node.isInOrganization)