| 65 | /** Revoke the specified installation token. */ |
| 66 | export async function revokeActiveInstallationToken(installationToken: string): Promise<void>; |
| 67 | export async function revokeActiveInstallationToken( |
| 68 | githubOrToken: Octokit | string, |
| 69 | ): Promise<void> { |
| 70 | if (typeof githubOrToken === 'string') { |
| 71 | await new Octokit({auth: githubOrToken, request: {fetch}}).apps.revokeInstallationAccessToken(); |
| 72 | } else { |
| 73 | await githubOrToken.apps.revokeInstallationAccessToken(); |
| 74 | } |
| 75 | info('Revoked installation token used for Angular Robot.'); |
| 76 | } |
| 77 | |
| 78 | export const utils = { |
| 79 | getAuthTokenFor, |