Skip to content

Commit

Permalink
fix: scale down runners (#905)
Browse files Browse the repository at this point in the history
* fix: scale down runners

* fix: scale down runners
  • Loading branch information
npalm committed Jun 17, 2021
1 parent 4afc1cb commit f024cda
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions modules/runners/lambdas/runners/src/scale-runners/gh-auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,14 @@ export async function createGithubAuth(
const appId: number = parseInt(process.env.GITHUB_APP_ID as string);
const clientId = process.env.GITHUB_APP_CLIENT_ID as string;

const authOptions: StrategyOptions = {
let authOptions: StrategyOptions = {
appId,
privateKey,
installationId,
clientId,
clientSecret,
};
if (installationId) authOptions = { ...authOptions, installationId };

console.debug(ghesApiUrl);
if (ghesApiUrl) {
authOptions.request = request.defaults({
Expand All @@ -61,9 +62,4 @@ export async function createGithubAuth(
}
const result = (await createAppAuth(authOptions)({ type: authType })) as AppAuthentication;
return result;
// if (result.type == 'oauth-app') {
// return result;
// } else {
// throw Error(`Authentication type ${authType} is not`);
// }
}

0 comments on commit f024cda

Please sign in to comment.