Create a JWT authenticated App client to manage installation tokens.
([appId, inputKey]: GithubAppMetadata)
| 12 | /** Angular Robot Github app (angular-robot). */ |
| 13 | export const ANGULAR_ROBOT: GithubAppMetadata = [43341, 'angular-robot-key']; |
| 14 | |
| 15 | /** Create a JWT authenticated App client to manage installation tokens. */ |
| 16 | async function getJwtAuthedAppClient([appId, inputKey]: GithubAppMetadata): Promise<Octokit> { |
| 17 | /** The private key for the angular robot app. */ |
| 18 | const privateKey = getInput(inputKey, {required: true}); |
| 19 | |
| 20 | return new Octokit({ |
| 21 | authStrategy: createAppAuth, |
| 22 | auth: {appId, privateKey}, |
| 23 | }); |
| 24 | } |
| 25 |
no test coverage detected