From 209acbfd48feb2adc9a09c47bb169d599d5fffdb Mon Sep 17 00:00:00 2001 From: Parker Brown <17183625+parkerbxyz@users.noreply.github.com> Date: Fri, 10 Apr 2026 23:18:41 -0700 Subject: [PATCH 1/3] fix: improve error message when app identifier is empty When 'client-id' or 'app-id' resolves to an empty string (e.g. because secrets are unavailable in Dependabot PRs or reusable workflows without `secrets: inherit`), the previous error message was not actionable. Update the validation message to explain common causes so users can quickly diagnose the issue. Closes #249 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- dist/main.cjs | 2 +- main.js | 2 +- tests/index.js.snapshot | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dist/main.cjs b/dist/main.cjs index c7cf562..63a3f0b 100644 --- a/dist/main.cjs +++ b/dist/main.cjs @@ -23352,7 +23352,7 @@ async function run() { ensureNativeProxySupport(); const clientId = getInput("client-id") || getInput("app-id"); if (!clientId) { - throw new Error("Either 'client-id' or 'app-id' input must be set"); + throw new Error("The 'client-id' input must be set to a non-empty string. If using a secret or variable, ensure it is available in this workflow context."); } const privateKey = getInput("private-key"); const owner = getInput("owner"); diff --git a/main.js b/main.js index b685126..92bbcab 100644 --- a/main.js +++ b/main.js @@ -20,7 +20,7 @@ async function run() { const clientId = core.getInput("client-id") || core.getInput("app-id"); if (!clientId) { - throw new Error("Either 'client-id' or 'app-id' input must be set"); + throw new Error("The 'client-id' input must be set to a non-empty string. If using a secret or variable, ensure it is available in this workflow context."); } const privateKey = core.getInput("private-key"); const owner = core.getInput("owner"); diff --git a/tests/index.js.snapshot b/tests/index.js.snapshot index d5d5f9b..3e33e3f 100644 --- a/tests/index.js.snapshot +++ b/tests/index.js.snapshot @@ -56,11 +56,11 @@ POST /api/v3/app/installations/123456/access_tokens `; exports[`main-missing-client-and-app-id.test.js > stderr 1`] = ` -Either 'client-id' or 'app-id' input must be set +The 'client-id' input must be set to a non-empty string. If using a secret or variable, ensure it is available in this workflow context. `; exports[`main-missing-client-and-app-id.test.js > stdout 1`] = ` -::error::Either 'client-id' or 'app-id' input must be set +::error::The 'client-id' input must be set to a non-empty string. If using a secret or variable, ensure it is available in this workflow context. `; exports[`main-missing-owner.test.js > stderr 1`] = ` From d7cc7ca2d9ee941463bab3bdb2642a31540b22d5 Mon Sep 17 00:00:00 2001 From: Parker Brown <17183625+parkerbxyz@users.noreply.github.com> Date: Fri, 10 Apr 2026 23:37:41 -0700 Subject: [PATCH 2/3] Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index 92bbcab..32696dd 100644 --- a/main.js +++ b/main.js @@ -20,7 +20,7 @@ async function run() { const clientId = core.getInput("client-id") || core.getInput("app-id"); if (!clientId) { - throw new Error("The 'client-id' input must be set to a non-empty string. If using a secret or variable, ensure it is available in this workflow context."); + throw new Error("The 'client-id' (or deprecated 'app-id') input must be set to a non-empty string. If using a secret or variable, ensure it is available in this workflow context."); } const privateKey = core.getInput("private-key"); const owner = core.getInput("owner"); From 1526f19324465b6dc28de2a6f27e13b5217a42c4 Mon Sep 17 00:00:00 2001 From: Parker Brown <17183625+parkerbxyz@users.noreply.github.com> Date: Fri, 10 Apr 2026 23:39:11 -0700 Subject: [PATCH 3/3] build: update snapshot and dist for suggested change Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- dist/main.cjs | 2 +- tests/index.js.snapshot | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dist/main.cjs b/dist/main.cjs index 63a3f0b..b9dc621 100644 --- a/dist/main.cjs +++ b/dist/main.cjs @@ -23352,7 +23352,7 @@ async function run() { ensureNativeProxySupport(); const clientId = getInput("client-id") || getInput("app-id"); if (!clientId) { - throw new Error("The 'client-id' input must be set to a non-empty string. If using a secret or variable, ensure it is available in this workflow context."); + throw new Error("The 'client-id' (or deprecated 'app-id') input must be set to a non-empty string. If using a secret or variable, ensure it is available in this workflow context."); } const privateKey = getInput("private-key"); const owner = getInput("owner"); diff --git a/tests/index.js.snapshot b/tests/index.js.snapshot index 3e33e3f..4789f44 100644 --- a/tests/index.js.snapshot +++ b/tests/index.js.snapshot @@ -56,11 +56,11 @@ POST /api/v3/app/installations/123456/access_tokens `; exports[`main-missing-client-and-app-id.test.js > stderr 1`] = ` -The 'client-id' input must be set to a non-empty string. If using a secret or variable, ensure it is available in this workflow context. +The 'client-id' (or deprecated 'app-id') input must be set to a non-empty string. If using a secret or variable, ensure it is available in this workflow context. `; exports[`main-missing-client-and-app-id.test.js > stdout 1`] = ` -::error::The 'client-id' input must be set to a non-empty string. If using a secret or variable, ensure it is available in this workflow context. +::error::The 'client-id' (or deprecated 'app-id') input must be set to a non-empty string. If using a secret or variable, ensure it is available in this workflow context. `; exports[`main-missing-owner.test.js > stderr 1`] = `