mirror of
https://github.com/actions/create-github-app-token.git
synced 2026-12-04 15:19:05 +00:00
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:
1 parent
5611f921d9
commit
2540ed49e5
1 file changed
+2
@@ -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