Files
create-github-app-token/lib/post.js
T
Gregor Martynus c08c5ace34 fix(GHES): respect GITHUB_API_URL when creating installation access token (#38)
Follow up to #36. I just wanted to do some refactoring but turns out I
missed to pass the custom `request` instance to `createAppAuth`. It will
fallback to the default `request` which does not respect
`GITHUB_API_URL`
2023-08-29 22:29:41 -07:00

20 lines
374 B
JavaScript

// @ts-check
/**
* @param {import("@actions/core")} core
* @param {import("@octokit/request").request} request
*/
export async function post(core, request) {
const token = core.getState("token");
if (!token) return;
await request("DELETE /installation/token", {
headers: {
authorization: `token ${token}`,
},
});
core.info("Token revoked");
}