Skip to content

Commit 2540ed4

Browse files
dsanders11gr2m
andauthored
fix: check for token before revoking (actions#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 <[email protected]>
1 parent 5611f92 commit 2540ed4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/post.js

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ import { request } from "@octokit/request";
1010
export async function post(core, request) {
1111
const token = core.getState("token");
1212

13+
if (!token) return;
14+
1315
await request("DELETE /installation/token", {
1416
headers: {
1517
authorization: `token ${token}`,

0 commit comments

Comments
 (0)