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:
@@ -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}`,
|
||||
|
||||
Reference in New Issue
Block a user