Skip to content

Commit 2f8254d

Browse files
committed
update octokit to latest version
1 parent ac0f14c commit 2f8254d

File tree

4 files changed

+209
-387
lines changed

4 files changed

+209
-387
lines changed

lambdas/functions/control-plane/package.json

+5-4
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
},
1919
"devDependencies": {
2020
"@types/aws-lambda": "^8.10.146",
21+
"@types/node": "^22.13.10",
2122
"@vercel/ncc": "^0.38.3",
2223
"aws-sdk-client-mock": "^4.1.0",
2324
"aws-sdk-client-mock-jest": "^4.1.0",
@@ -34,10 +35,10 @@
3435
"@aws-sdk/client-sqs": "^3.758.0",
3536
"@aws-sdk/types": "^3.734.0",
3637
"@middy/core": "^4.7.0",
37-
"@octokit/auth-app": "6.1.3",
38-
"@octokit/core": "5.2.0",
39-
"@octokit/plugin-throttling": "8.2.0",
40-
"@octokit/rest": "20.1.2",
38+
"@octokit/auth-app": "7.1.5",
39+
"@octokit/core": "6.1.4",
40+
"@octokit/plugin-throttling": "9.4.0",
41+
"@octokit/rest": "21.1.1",
4142
"@octokit/types": "^13.8.0",
4243
"cron-parser": "^4.9.0"
4344
},

lambdas/functions/control-plane/src/github/auth.ts

+18-10
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
1-
import { createAppAuth } from '@octokit/auth-app';
2-
import {
3-
AppAuthOptions,
4-
AppAuthentication,
5-
AuthInterface,
6-
InstallationAccessTokenAuthentication,
7-
InstallationAuthOptions,
8-
StrategyOptions,
9-
} from '@octokit/auth-app/dist-types/types';
10-
import { OctokitOptions } from '@octokit/core/dist-types/types';
1+
import { createAppAuth, type AppAuthentication, type InstallationAccessTokenAuthentication } from '@octokit/auth-app';
2+
import type { OctokitOptions } from '@octokit/core';
3+
import type { RequestInterface } from '@octokit/types';
4+
5+
// Define types that are not directly exported
6+
type AppAuthOptions = { type: 'app' };
7+
type InstallationAuthOptions = { type: 'installation'; installationId?: number };
8+
// Use a more generalized AuthInterface to match what createAppAuth returns
9+
type AuthInterface = {
10+
(options: AppAuthOptions): Promise<AppAuthentication>;
11+
(options: InstallationAuthOptions): Promise<InstallationAccessTokenAuthentication>;
12+
};
13+
type StrategyOptions = {
14+
appId: number;
15+
privateKey: string;
16+
installationId?: number;
17+
request?: RequestInterface;
18+
};
1119
import { request } from '@octokit/request';
1220
import { Octokit } from '@octokit/rest';
1321
import { throttling } from '@octokit/plugin-throttling';

lambdas/functions/webhook/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@
3333
"@aws-github-runner/aws-ssm-util": "*",
3434
"@aws-sdk/client-sqs": "^3.758.0",
3535
"@middy/core": "^4.7.0",
36-
"@octokit/rest": "20.1.2",
36+
"@octokit/rest": "21.1.1",
3737
"@octokit/types": "^13.8.0",
38-
"@octokit/webhooks": "^12.3.1",
38+
"@octokit/webhooks": "^13.7.4",
3939
"aws-lambda": "^1.0.7"
4040
},
4141
"nx": {

0 commit comments

Comments
 (0)