Skip to content

Commit eada9ce

Browse files
committed
chore: make pool adhere to the linting conventions
1 parent d7a3444 commit eada9ce

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

lambdas/functions/control-plane/src/pool/pool.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { createRunners } from '../scale-runners/scale-up';
99
import { adjust } from './pool';
1010

1111
const mockOctokit = {
12-
paginate: (f: any, o: any) => f(o),
12+
paginate: (f: (arg0: unknown) => unknown[], o: unknown) => f(o),
1313
checks: { get: jest.fn() },
1414
actions: {
1515
createRegistrationTokenForOrg: jest.fn(),

lambdas/functions/control-plane/src/pool/pool.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ export async function adjust(event: PoolEvent): Promise<void> {
6969
const ghAuth = await createGithubInstallationAuth(installationId, ghesApiUrl);
7070
const githubInstallationClient = await createOctoClient(ghAuth.token, ghesApiUrl);
7171

72+
githubInstallationClient.paginate;
73+
7274
// Get statusses of runners registed in GitHub
7375
const runnerStatusses = await getGitHubRegisteredRunnnerStatusses(
7476
githubInstallationClient,
@@ -95,9 +97,9 @@ export async function adjust(event: PoolEvent): Promise<void> {
9597
if (runnerType === 'Repo') {
9698
repos = [repo];
9799
} 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.
101103
const reposAccessibleToInstallation = (await githubInstallationClient.paginate(
102104
githubInstallationClient.apps.listReposAccessibleToInstallation,
103105
{

0 commit comments

Comments
 (0)