File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
lambdas/functions/control-plane/src/pool Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ import { createRunners } from '../scale-runners/scale-up';
9
9
import { adjust } from './pool' ;
10
10
11
11
const mockOctokit = {
12
- paginate : ( f : any , o : any ) => f ( o ) ,
12
+ paginate : ( f : ( arg0 : unknown ) => unknown [ ] , o : unknown ) => f ( o ) ,
13
13
checks : { get : jest . fn ( ) } ,
14
14
actions : {
15
15
createRegistrationTokenForOrg : jest . fn ( ) ,
Original file line number Diff line number Diff line change @@ -69,6 +69,8 @@ export async function adjust(event: PoolEvent): Promise<void> {
69
69
const ghAuth = await createGithubInstallationAuth ( installationId , ghesApiUrl ) ;
70
70
const githubInstallationClient = await createOctoClient ( ghAuth . token , ghesApiUrl ) ;
71
71
72
+ githubInstallationClient . paginate ;
73
+
72
74
// Get statusses of runners registed in GitHub
73
75
const runnerStatusses = await getGitHubRegisteredRunnnerStatusses (
74
76
githubInstallationClient ,
@@ -95,9 +97,9 @@ export async function adjust(event: PoolEvent): Promise<void> {
95
97
if ( runnerType === 'Repo' ) {
96
98
repos = [ repo ] ;
97
99
} else {
98
- // @ts -ignore
99
- // The types normalized by paginate are not correct because they only flatten .data,
100
- // while in case of listReposAccessibleToInstallation they should normalize .repositories.
100
+ // @ts -expect-error The types normalized by paginate are not correct,
101
+ // because they only flatten .data, while in case of listReposAccessibleToInstallation ,
102
+ // they should flatten .repositories.
101
103
const reposAccessibleToInstallation = ( await githubInstallationClient . paginate (
102
104
githubInstallationClient . apps . listReposAccessibleToInstallation ,
103
105
{
You can’t perform that action at this time.
0 commit comments