File tree 2 files changed +7
-3
lines changed
2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -26,8 +26,12 @@ export class GitHubService extends RepositoryService {
26
26
@inject ( GithubContextParser ) protected githubContextParser : GithubContextParser ;
27
27
28
28
async getRepositoriesForAutomatedPrebuilds ( user : User ) : Promise < ProviderRepository [ ] > {
29
- const repositories = ( await this . githubApi . run ( user , ( gh ) => gh . repos . listForAuthenticatedUser ( { } ) ) ) . data ;
30
- const adminRepositories = repositories . filter ( ( r ) => ! ! r . permissions ?. admin ) ;
29
+ const octokit = await this . githubApi . create ( user ) ;
30
+ const adminRepositories = await octokit . paginate (
31
+ octokit . repos . listForAuthenticatedUser ,
32
+ { per_page : 100 } ,
33
+ ( response ) => response . data . filter ( ( r ) => ! ! r . permissions ?. admin ) ,
34
+ ) ;
31
35
return adminRepositories . map ( ( r ) => {
32
36
return < ProviderRepository > {
33
37
name : r . name ,
Original file line number Diff line number Diff line change @@ -140,7 +140,7 @@ export interface QueryLocation {
140
140
export class GitHubRestApi {
141
141
@inject ( AuthProviderParams ) readonly config : AuthProviderParams ;
142
142
@inject ( GitHubTokenHelper ) protected readonly tokenHelper : GitHubTokenHelper ;
143
- protected async create ( userOrToken : User | string ) {
143
+ public async create ( userOrToken : User | string ) {
144
144
let token : string | undefined ;
145
145
if ( typeof userOrToken === "string" ) {
146
146
token = userOrToken ;
You can’t perform that action at this time.
0 commit comments