From 633bfb57129d8b619628f71cd88aed8323bd943a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 22 May 2026 05:05:01 +0000 Subject: [PATCH] [jsweep] Document precedence behavior in action_input_utils.cjs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Improved JSDoc to explicitly document that the underscore form has precedence over the hyphen form, clarifying the OR chain behavior that the existing tests already verify. File was already in excellent shape: - Modern ES6+ JavaScript - Full TypeScript type checking enabled (@ts-check) - Comprehensive test coverage (13 tests covering all edge cases) - No code smells or unnecessary try/catch blocks Changes: - Enhanced JSDoc documentation for precedence behavior Validation: ✅ npm run format:cjs - passed ✅ npm run lint:cjs - passed ✅ npm run typecheck - passed ✅ npm run test:js - 13/13 tests passed Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- actions/setup/js/action_input_utils.cjs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/actions/setup/js/action_input_utils.cjs b/actions/setup/js/action_input_utils.cjs index 5db08e77260..b5eec1054e8 100644 --- a/actions/setup/js/action_input_utils.cjs +++ b/actions/setup/js/action_input_utils.cjs @@ -9,6 +9,10 @@ * some runner versions preserve the original hyphen from the input name. Checking * both forms ensures the value is resolved regardless of the runner version. * + * The underscore form has precedence: if `INPUT_` exists (even as whitespace), + * it is used. The hyphen form is only checked if the underscore form is absent or + * empty string. + * * @param {string} name - Input name in UPPER_UNDERSCORE form (e.g. "JOB_NAME") * @returns {string} Trimmed input value, or "" if not set. */