Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 064492a

Browse filesBrowse files
build(release): 2.0.0 [skip ci]
# [2.0.0](v1.12.0...v2.0.0) (2025-04-03) * feat!: remove deprecated inputs ([#213](#213)) ([5cc811b](5cc811b)) ### BREAKING CHANGES * Removed deprecated inputs (`app_id`, `private_key`, `skip_token_revoke`) and made `app-id` and `private-key` required in the action configuration.
1 parent 5cc811b commit 064492a
Copy full SHA for 064492a

File tree

4 files changed

+24
-36
lines changed
Filter options

4 files changed

+24
-36
lines changed

‎dist/main.cjs

Copy file name to clipboardExpand all lines: dist/main.cjs
+19-27Lines changed: 19 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -42271,6 +42271,22 @@ function createAppAuth(options) {
4227142271
});
4227242272
}
4227342273

42274+
// lib/get-permissions-from-inputs.js
42275+
function getPermissionsFromInputs(env) {
42276+
return Object.entries(env).reduce((permissions2, [key, value]) => {
42277+
if (!key.startsWith("INPUT_PERMISSION_")) return permissions2;
42278+
const permission = key.slice("INPUT_PERMISSION_".length).toLowerCase();
42279+
if (permissions2 === void 0) {
42280+
return { [permission]: value };
42281+
}
42282+
return {
42283+
// @ts-expect-error - needs to be typed correctly
42284+
...permissions2,
42285+
[permission]: value
42286+
};
42287+
}, void 0);
42288+
}
42289+
4227442290
// node_modules/p-retry/index.js
4227542291
var import_retry = __toESM(require_retry2(), 1);
4227642292

@@ -42527,42 +42543,18 @@ var request_default = request.defaults({
4252742543
request: proxyUrl ? { fetch: proxyFetch } : {}
4252842544
});
4252942545

42530-
// lib/get-permissions-from-inputs.js
42531-
function getPermissionsFromInputs(env) {
42532-
return Object.entries(env).reduce((permissions2, [key, value]) => {
42533-
if (!key.startsWith("INPUT_PERMISSION_")) return permissions2;
42534-
const permission = key.slice("INPUT_PERMISSION_".length).toLowerCase();
42535-
if (permissions2 === void 0) {
42536-
return { [permission]: value };
42537-
}
42538-
return {
42539-
// @ts-expect-error - needs to be typed correctly
42540-
...permissions2,
42541-
[permission]: value
42542-
};
42543-
}, void 0);
42544-
}
42545-
4254642546
// main.js
4254742547
if (!process.env.GITHUB_REPOSITORY) {
4254842548
throw new Error("GITHUB_REPOSITORY missing, must be set to '<owner>/<repo>'");
4254942549
}
4255042550
if (!process.env.GITHUB_REPOSITORY_OWNER) {
4255142551
throw new Error("GITHUB_REPOSITORY_OWNER missing, must be set to '<owner>'");
4255242552
}
42553-
var appId = import_core2.default.getInput("app-id") || import_core2.default.getInput("app_id");
42554-
if (!appId) {
42555-
throw new Error("Input required and not supplied: app-id");
42556-
}
42557-
var privateKey = import_core2.default.getInput("private-key") || import_core2.default.getInput("private_key");
42558-
if (!privateKey) {
42559-
throw new Error("Input required and not supplied: private-key");
42560-
}
42553+
var appId = import_core2.default.getInput("app-id");
42554+
var privateKey = import_core2.default.getInput("private-key");
4256142555
var owner = import_core2.default.getInput("owner");
4256242556
var repositories = import_core2.default.getInput("repositories").split(/[\n,]+/).map((s) => s.trim()).filter((x) => x !== "");
42563-
var skipTokenRevoke = Boolean(
42564-
import_core2.default.getInput("skip-token-revoke") || import_core2.default.getInput("skip_token_revoke")
42565-
);
42557+
var skipTokenRevoke = Boolean(import_core2.default.getInput("skip-token-revoke"));
4256642558
var permissions = getPermissionsFromInputs(process.env);
4256742559
var main_default = main(
4256842560
appId,

‎dist/post.cjs

Copy file name to clipboardExpand all lines: dist/post.cjs
+2-6Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40202,9 +40202,7 @@ var import_core2 = __toESM(require_core(), 1);
4020240202

4020340203
// lib/post.js
4020440204
async function post(core3, request2) {
40205-
const skipTokenRevoke = Boolean(
40206-
core3.getInput("skip-token-revoke") || core3.getInput("skip_token_revoke")
40207-
);
40205+
const skipTokenRevoke = Boolean(core3.getInput("skip-token-revoke"));
4020840206
if (skipTokenRevoke) {
4020940207
core3.info("Token revocation was skipped");
4021040208
return;
@@ -40227,9 +40225,7 @@ async function post(core3, request2) {
4022740225
});
4022840226
core3.info("Token revoked");
4022940227
} catch (error) {
40230-
core3.warning(
40231-
`Token revocation failed: ${error.message}`
40232-
);
40228+
core3.warning(`Token revocation failed: ${error.message}`);
4023340229
}
4023440230
}
4023540231
function tokenExpiresIn(expiresAt) {

‎package-lock.json

Copy file name to clipboardExpand all lines: package-lock.json
+2-2Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

Copy file name to clipboardExpand all lines: package.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "create-github-app-token",
33
"private": true,
44
"type": "module",
5-
"version": "1.12.0",
5+
"version": "2.0.0",
66
"description": "GitHub Action for creating a GitHub App Installation Access Token",
77
"scripts": {
88
"build": "esbuild main.js post.js --bundle --outdir=dist --out-extension:.js=.cjs --platform=node --target=node20.0.0 --packages=bundle",

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.