@@ -52,17 +52,16 @@ export default async function({login, data, graphql, rest, q, queries, imports,
5252 let pushed = 0
5353 do {
5454 console . debug ( `metrics/compute/${ login } /plugins > people > retrieving ${ type } after ${ cursor } ` )
55- const { [ type ] : { edges} } = (
56- type in context . sponsorships
57- ? ( await graphql ( queries . people . sponsors ( { login : context . owner ?? login , type, size, after : cursor ? `after: "${ cursor } "` : "" , target : context . sponsorships [ type ] , account} ) ) ) [ account ]
58- : context . mode === "repository"
59- ? ( await graphql ( queries . people . repository ( { login : context . owner , repository : context . repo , type, size, after : cursor ? `after: "${ cursor } "` : "" , account} ) ) ) [ account ] . repository
60- : ( await graphql ( queries . people ( { login, type, size, after : cursor ? `after: "${ cursor } "` : "" , account} ) ) ) [ account ]
61- )
55+ const { [ type ] : { edges} } = type in context . sponsorships
56+ ? ( await graphql ( queries . people . sponsors ( { login : context . owner ?? login , type, size, after : cursor ? `after: "${ cursor } "` : "" , target : context . sponsorships [ type ] , account} ) ) ) [ account ]
57+ : context . mode === "repository"
58+ ? ( await graphql ( queries . people . repository ( { login : context . owner , repository : context . repo , type, size, after : cursor ? `after: "${ cursor } "` : "" , account} ) ) ) [ account ] . repository
59+ : ( await graphql ( queries . people ( { login, type, size, after : cursor ? `after: "${ cursor } "` : "" , account} ) ) ) [ account ]
6260 cursor = edges ?. [ edges ?. length - 1 ] ?. cursor
6361 result [ type ] . push ( ...edges . map ( ( { node} ) => node [ context . sponsorships [ type ] ] ?? node ) )
6462 pushed = edges . length
65- } while ( ( pushed ) && ( cursor ) && ( ( limit === 0 ) || ( result [ type ] . length <= ( shuffle ? 10 * limit : limit ) ) ) )
63+ }
64+ while ( ( pushed ) && ( cursor ) && ( ( limit === 0 ) || ( result [ type ] . length <= ( shuffle ? 10 * limit : limit ) ) ) )
6665 }
6766 //Shuffle
6867 if ( shuffle ) {
0 commit comments