fix: check for token before revoking (#30)

Check before trying to revoke the token, in case the token generation
failed. Otherwise the post step will throw an error.

---------

Co-authored-by: Gregor Martynus <39992+gr2m@users.noreply.github.com>
This commit is contained in:
David Sanders
2023-08-28 15:14:31 -07:00
committed by GitHub
parent 5611f921d9
commit 2540ed49e5
+2
View File
@@ -10,6 +10,8 @@ import { request } from "@octokit/request";
export async function post(core, request) {
const token = core.getState("token");
if (!token) return;
await request("DELETE /installation/token", {
headers: {
authorization: `token ${token}`,