From 337e3e8182a13351dbd0419686ec4388b1551302 Mon Sep 17 00:00:00 2001 From: Nick Sheck Date: Thu, 10 Oct 2024 15:24:31 -0700 Subject: [PATCH] Switch space -> comma separated args And reuse the previous (shorter) description of the input --- README.md | 2 +- action.yml | 4 ++-- dist/index.js | 2 +- src/index.ts | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 7b09281..8c66f6a 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ jobs: | `failure-level` | The lowest annotation level to fail on ("warning or "error"") | no | `"error"` | | `conclusion-level` | Action conclusion ("success" or "failure") if annotations of the failure-level were created. | no | `"success"` | | `working-directory` | Which directory to run the action in | no | `"."` | -| `extensions` | Space separated list of extenions. Only changed files with these extensions will be passed to ESlint. | no | `".js .ts .jsx .tsx .mjs .cjs"` | +| `extensions` | A comma separated list of extensions to run ESLint on. | no | `".js,.ts,.jsx,.tsx,.mjs,.cjs"` | ## Outputs diff --git a/action.yml b/action.yml index ae542ec..e3c797b 100644 --- a/action.yml +++ b/action.yml @@ -20,9 +20,9 @@ inputs: required: false default: "." extensions: - description: Space separated list of extenions. Only changed files with these extensions will be passed to ESlint. + description: A comma separated list of extensions to run ESLint on. required: false - default: ".js .ts .jsx .tsx .mjs .cjs" + default: ".js,.ts,.jsx,.tsx,.mjs,.cjs" outputs: warning-count: description: "Number of relevant warnings found" diff --git a/dist/index.js b/dist/index.js index 5fd4316..855c49e 100644 --- a/dist/index.js +++ b/dist/index.js @@ -26363,7 +26363,7 @@ async function run() { changedFiles = await (0, git_utils_1.detectChangedFiles)(compareSha); } core.debug(`Changed files: ${changedFiles}`); - let extensions = core.getInput("extensions").split(" "); + let extensions = core.getInput("extensions").split(","); core.debug(`Extensions: ${extensions}`); let changedFilesMatchingExtensions = changedFiles.filter((file) => extensions.some((ext) => file.endsWith(ext))); core.debug(`Changed files matching extensions: ${changedFilesMatchingExtensions}`); diff --git a/src/index.ts b/src/index.ts index fdee099..600e5bc 100644 --- a/src/index.ts +++ b/src/index.ts @@ -34,7 +34,7 @@ async function run() { core.debug(`Changed files: ${changedFiles}`) - let extensions = core.getInput("extensions").split(" ") + let extensions = core.getInput("extensions").split(",") core.debug(`Extensions: ${extensions}`) let changedFilesMatchingExtensions = changedFiles.filter((file) => extensions.some((ext) => file.endsWith(ext)),