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(
46
46
const appId : number = parseInt ( process . env . GITHUB_APP_ID as string ) ;
47
47
const clientId = process . env . GITHUB_APP_CLIENT_ID as string ;
48
48
49
- const authOptions : StrategyOptions = {
49
+ let authOptions : StrategyOptions = {
50
50
appId,
51
51
privateKey,
52
- installationId,
53
52
clientId,
54
53
clientSecret,
55
54
} ;
55
+ if ( installationId ) authOptions = { ...authOptions , installationId } ;
56
+
56
57
console . debug ( ghesApiUrl ) ;
57
58
if ( ghesApiUrl ) {
58
59
authOptions . request = request . defaults ( {
@@ -61,9 +62,4 @@ export async function createGithubAuth(
61
62
}
62
63
const result = ( await createAppAuth ( authOptions ) ( { type : authType } ) ) as AppAuthentication ;
63
64
return result ;
64
- // if (result.type == 'oauth-app') {
65
- // return result;
66
- // } else {
67
- // throw Error(`Authentication type ${authType} is not`);
68
- // }
69
65
}
You can’t perform that action at this time.
0 commit comments