From a0ebec2ad970c69493a6fcbb74af0186b9831723 Mon Sep 17 00:00:00 2001 From: David Anson Date: Tue, 12 Jan 2021 22:25:46 -0800 Subject: [PATCH] Get glob input and pass through to command. --- README.md | 10 ++++++++-- dist/index.js | 4 +++- markdownlint-cli2-action.js | 4 +++- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index f51b4d3..cc246eb 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,15 @@ A GitHub Action to run the markdownlint-cli2 tool for linting Markdown/CommonMar ## Inputs -### glob +### glob (optional) -... +Glob expression of files to lint + +Default: `*.{md,markdown}` + +## Outputs + +[None] ## Example diff --git a/dist/index.js b/dist/index.js index 9759047..3660afc 100644 --- a/dist/index.js +++ b/dist/index.js @@ -16,8 +16,10 @@ const { "main": markdownlintCli2 } = __nccwpck_require__(9202); const logMessage = core.info; const logError = core.error; +const glob = core.getInput("glob"); + markdownlintCli2({ - "argv": [], + "argv": [ glob ], logMessage, logError }).then( diff --git a/markdownlint-cli2-action.js b/markdownlint-cli2-action.js index 1b971f4..8a11252 100644 --- a/markdownlint-cli2-action.js +++ b/markdownlint-cli2-action.js @@ -8,8 +8,10 @@ const { "main": markdownlintCli2 } = require("markdownlint-cli2"); const logMessage = core.info; const logError = core.error; +const glob = core.getInput("glob"); + markdownlintCli2({ - "argv": [], + "argv": [ glob ], logMessage, logError }).then(