Skip to content
This repository was archived by the owner on Jan 16, 2025. It is now read-only.

Commit f024cda

Browse files
committed
fix: scale down runners (#905)
* fix: scale down runners * fix: scale down runners
1 parent 4afc1cb commit f024cda

File tree

1 file changed

+3
-7
lines changed
  • modules/runners/lambdas/runners/src/scale-runners

1 file changed

+3
-7
lines changed

modules/runners/lambdas/runners/src/scale-runners/gh-auth.ts

+3-7
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,14 @@ export async function createGithubAuth(
4646
const appId: number = parseInt(process.env.GITHUB_APP_ID as string);
4747
const clientId = process.env.GITHUB_APP_CLIENT_ID as string;
4848

49-
const authOptions: StrategyOptions = {
49+
let authOptions: StrategyOptions = {
5050
appId,
5151
privateKey,
52-
installationId,
5352
clientId,
5453
clientSecret,
5554
};
55+
if (installationId) authOptions = { ...authOptions, installationId };
56+
5657
console.debug(ghesApiUrl);
5758
if (ghesApiUrl) {
5859
authOptions.request = request.defaults({
@@ -61,9 +62,4 @@ export async function createGithubAuth(
6162
}
6263
const result = (await createAppAuth(authOptions)({ type: authType })) as AppAuthentication;
6364
return result;
64-
// if (result.type == 'oauth-app') {
65-
// return result;
66-
// } else {
67-
// throw Error(`Authentication type ${authType} is not`);
68-
// }
6965
}

0 commit comments

Comments
 (0)