'");
}
-const appId = core.getInput("app-id") || core.getInput("app_id");
-if (!appId) {
- // The 'app_id' input was previously required, but it and 'app-id' are both optional now, until the former is removed. Still, we want to ensure that at least one of them is set.
- throw new Error("Input required and not supplied: app-id");
-}
-const privateKey = core.getInput("private-key") || core.getInput("private_key");
-if (!privateKey) {
- // The 'private_key' input was previously required, but it and 'private-key' are both optional now, until the former is removed. Still, we want to ensure that at least one of them is set.
- throw new Error("Input required and not supplied: private-key");
-}
+const appId = core.getInput("app-id");
+const privateKey = core.getInput("private-key");
const owner = core.getInput("owner");
const repositories = core
.getInput("repositories")
@@ -32,9 +24,7 @@ const repositories = core
.map((s) => s.trim())
.filter((x) => x !== "");
-const skipTokenRevoke = Boolean(
- core.getInput("skip-token-revoke") || core.getInput("skip_token_revoke"),
-);
+const skipTokenRevoke = Boolean(core.getInput("skip-token-revoke"));
const permissions = getPermissionsFromInputs(process.env);
diff --git a/package-lock.json b/package-lock.json
index 42a7c74..60e64f5 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "create-github-app-token",
- "version": "1.11.6",
+ "version": "2.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "create-github-app-token",
- "version": "1.11.6",
+ "version": "2.0.0",
"license": "MIT",
"dependencies": {
"@actions/core": "^1.11.1",
diff --git a/package.json b/package.json
index fe1c992..d074ecc 100644
--- a/package.json
+++ b/package.json
@@ -2,7 +2,7 @@
"name": "create-github-app-token",
"private": true,
"type": "module",
- "version": "1.12.0",
+ "version": "2.0.0",
"description": "GitHub Action for creating a GitHub App Installation Access Token",
"scripts": {
"build": "esbuild main.js post.js --bundle --outdir=dist --out-extension:.js=.cjs --platform=node --target=node20.0.0 --packages=bundle",
@@ -45,6 +45,7 @@
{
"assets": [
"package.json",
+ "package-lock.json",
"dist/*"
],
"message": "build(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
diff --git a/tests/main-missing-app-id.test.js b/tests/main-missing-app-id.test.js
deleted file mode 100644
index 9382b44..0000000
--- a/tests/main-missing-app-id.test.js
+++ /dev/null
@@ -1,9 +0,0 @@
-process.env.GITHUB_REPOSITORY_OWNER = "actions";
-process.env.GITHUB_REPOSITORY = "actions/create-github-app-token";
-
-// Verify `main` exits with an error when neither the `app-id` nor `app_id` input is set.
-try {
- await import("../main.js");
-} catch (error) {
- console.error(error.message);
-}
diff --git a/tests/main-missing-private-key.test.js b/tests/main-missing-private-key.test.js
deleted file mode 100644
index a78b1c7..0000000
--- a/tests/main-missing-private-key.test.js
+++ /dev/null
@@ -1,10 +0,0 @@
-process.env.GITHUB_REPOSITORY_OWNER = "actions";
-process.env.GITHUB_REPOSITORY = "actions/create-github-app-token";
-process.env["INPUT_APP-ID"] = "123456";
-
-// Verify `main` exits with an error when neither the `private-key` nor `private_key` input is set.
-try {
- await import("../main.js");
-} catch (error) {
- console.error(error.message);
-}
diff --git a/tests/snapshots/index.js.md b/tests/snapshots/index.js.md
index f085f87..eeb7387 100644
--- a/tests/snapshots/index.js.md
+++ b/tests/snapshots/index.js.md
@@ -12,9 +12,7 @@ Generated by [AVA](https://avajs.dev).
> stdout
- `app_id — 'app_id' is deprecated and will be removed in a future version. Use 'app-id' instead.␊
- private_key — 'private_key' is deprecated and will be removed in a future version. Use 'private-key' instead.␊
- skip_token_revoke — 'skip_token_revoke' is deprecated and will be removed in a future version. Use 'skip-token-revoke' instead.`
+ ''
## main-custom-github-api-url.test.js
@@ -39,16 +37,6 @@ Generated by [AVA](https://avajs.dev).
POST /api/v3/app/installations/123456/access_tokens␊
{"repositories":["create-github-app-token"]}`
-## main-missing-app-id.test.js
-
-> stderr
-
- 'Input required and not supplied: app-id'
-
-> stdout
-
- ''
-
## main-missing-owner.test.js
> stderr
@@ -59,16 +47,6 @@ Generated by [AVA](https://avajs.dev).
''
-## main-missing-private-key.test.js
-
-> stderr
-
- 'Input required and not supplied: private-key'
-
-> stdout
-
- ''
-
## main-missing-repository.test.js
> stderr
diff --git a/tests/snapshots/index.js.snap b/tests/snapshots/index.js.snap
index 2291b3a..14f1a6c 100644
Binary files a/tests/snapshots/index.js.snap and b/tests/snapshots/index.js.snap differ
pFad - Phonifier reborn
Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies:
Alternative Proxy
pFad Proxy
pFad v3 Proxy
pFad v4 Proxy