File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
modules/runners/lambdas/runners/src/scale-runners Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments