Create a JWT authenticated App client to manage installation tokens.
([appId, inputKey]: GithubAppMetadata)
| 12 | |
| 13 | /** Create a JWT authenticated App client to manage installation tokens. */ |
| 14 | async function getJwtAuthedAppClient([appId, inputKey]: GithubAppMetadata) { |
| 15 | /** The private key for the angular robot app. */ |
| 16 | const privateKey = getInput(inputKey, {required: true}); |
| 17 | |
| 18 | return new Octokit({ |
| 19 | authStrategy: createAppAuth, |
| 20 | auth: {appId, privateKey}, |
| 21 | }); |
| 22 | } |
| 23 | |
| 24 | // Local types for Org and Repo to make the typings in getAuthTokenFor more readable. |
| 25 | type Org = {org: string}; |
no test coverage detected