Skip to content

Commit 1e5b660

Browse files
committed
Remove "command" input deprecated in v11.
1 parent b1a3c7b commit 1e5b660

File tree

6 files changed

+24
-147
lines changed

6 files changed

+24
-147
lines changed

Diff for: .github/dictionary.txt

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
CommonMark
22
config
3+
LLMs
34
markdownlint-cli2-action
5+
npm
46
README
57
truthy

Diff for: .github/workflows/test.yml

-64
Original file line numberDiff line numberDiff line change
@@ -69,70 +69,6 @@ jobs:
6969
id: test
7070
- run: exit 1
7171
if: steps.test.outcome != 'failure'
72-
command-config:
73-
name: Command = config (test/errors.md, 2 errors)
74-
runs-on: ubuntu-latest
75-
steps:
76-
- uses: actions/checkout@v4
77-
- run: rm .markdownlint.json
78-
- uses: ./
79-
with:
80-
command: config
81-
globs: |
82-
config/test.markdownlint.jsonc
83-
test/*
84-
continue-on-error: true
85-
id: test
86-
- run: exit 1
87-
if: steps.test.outcome != 'failure'
88-
command-config-invalid:
89-
name: Command = config (invalid configuration file, fails)
90-
runs-on: ubuntu-latest
91-
steps:
92-
- uses: actions/checkout@v4
93-
- uses: ./
94-
with:
95-
command: config
96-
globs: |
97-
invalid.markdownlint.jsonc
98-
test/*
99-
continue-on-error: true
100-
id: test
101-
- run: exit 1
102-
if: steps.test.outcome != 'failure'
103-
command-config-missing:
104-
name: Command = config (missing configuration file, fails)
105-
runs-on: ubuntu-latest
106-
steps:
107-
- uses: actions/checkout@v4
108-
- uses: ./
109-
with:
110-
command: config
111-
continue-on-error: true
112-
id: test
113-
- run: exit 1
114-
if: steps.test.outcome != 'failure'
115-
command-fix:
116-
name: Command = fix (test/errors.md, 0 errors)
117-
runs-on: ubuntu-latest
118-
steps:
119-
- uses: actions/checkout@v4
120-
- uses: ./
121-
with:
122-
command: fix
123-
globs: 'test/*'
124-
command-unsupported:
125-
name: Command = unsupported (fails)
126-
runs-on: ubuntu-latest
127-
steps:
128-
- uses: actions/checkout@v4
129-
- uses: ./
130-
with:
131-
command: unsupported
132-
continue-on-error: true
133-
id: test
134-
- run: exit 1
135-
if: steps.test.outcome != 'failure'
13672
config:
13773
name: config (test/errors.md, 2 errors)
13874
runs-on: ubuntu-latest

Diff for: README.md

-16
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,6 @@ information.
1313

1414
## Inputs
1515

16-
### command (optional)
17-
18-
> **Deprecated in favor of the "fix" and "config" inputs**
19-
>
20-
> Command to run (unset, `fix`, or `config`)
21-
>
22-
> If unspecified or `""`, the `markdownlint-cli2` command is run.
23-
>
24-
> If set to `fix`, the `markdownlint-cli2-fix` command is run and supported
25-
> issues will be fixed automatically.
26-
>
27-
> If set to `config`, the `markdownlint-cli2-config` command is run and the
28-
> first element of `globs` should specify a supported configuration file.
29-
>
30-
> For more detail: [documentation for `markdownlint-cli2`][command-line].
31-
3216
### config (optional)
3317

3418
Path of a file to use for the base configuration object (defaults to none)

Diff for: action.yml

-5
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@ branding:
55
icon: check-square
66
color: orange
77
inputs:
8-
command:
9-
description: Command to run (unset, "fix", or "config")
10-
deprecationMessage: This input is deprecated in favor of the "fix" and "config" inputs
11-
default: ''
12-
required: false
138
config:
149
description: Path of a file to use for the base configuration object (defaults to none)
1510
default: ''

Diff for: dist/index.js

+11-31
Original file line numberDiff line numberDiff line change
@@ -58908,37 +58908,17 @@ if (fix) {
5890858908
argv.push("--fix");
5890958909
}
5891058910

58911-
let invoke = true;
58912-
const command = core.getInput("command");
58913-
switch (command) {
58914-
case "":
58915-
// Default behavior
58916-
break;
58917-
case "config":
58918-
argv.unshift("--config");
58919-
break;
58920-
case "fix":
58921-
argv.unshift("--fix");
58922-
break;
58923-
default:
58924-
core.setFailed(`Unsupported command: ${command}`);
58925-
invoke = false;
58926-
break;
58927-
}
58928-
58929-
if (invoke) {
58930-
const parameters = {
58931-
argv,
58932-
logMessage,
58933-
"optionsOverride": {
58934-
"outputFormatters": [[outputFormatter]]
58935-
}
58936-
};
58937-
markdownlintCli2(parameters).then(
58938-
(code) => code && core.setFailed(`Failed with exit code: ${code}`),
58939-
(error) => core.setFailed(`Failed due to error: ${error}`)
58940-
);
58941-
}
58911+
const parameters = {
58912+
argv,
58913+
logMessage,
58914+
"optionsOverride": {
58915+
"outputFormatters": [[outputFormatter]]
58916+
}
58917+
};
58918+
markdownlintCli2(parameters).then(
58919+
(code) => code && core.setFailed(`Failed with exit code: ${code}`),
58920+
(error) => core.setFailed(`Failed due to error: ${error}`)
58921+
);
5894258922

5894358923
})();
5894458924

Diff for: markdownlint-cli2-action.js

+11-31
Original file line numberDiff line numberDiff line change
@@ -60,34 +60,14 @@ if (fix) {
6060
argv.push("--fix");
6161
}
6262

63-
let invoke = true;
64-
const command = core.getInput("command");
65-
switch (command) {
66-
case "":
67-
// Default behavior
68-
break;
69-
case "config":
70-
argv.unshift("--config");
71-
break;
72-
case "fix":
73-
argv.unshift("--fix");
74-
break;
75-
default:
76-
core.setFailed(`Unsupported command: ${command}`);
77-
invoke = false;
78-
break;
79-
}
80-
81-
if (invoke) {
82-
const parameters = {
83-
argv,
84-
logMessage,
85-
"optionsOverride": {
86-
"outputFormatters": [[outputFormatter]]
87-
}
88-
};
89-
markdownlintCli2(parameters).then(
90-
(code) => code && core.setFailed(`Failed with exit code: ${code}`),
91-
(error) => core.setFailed(`Failed due to error: ${error}`)
92-
);
93-
}
63+
const parameters = {
64+
argv,
65+
logMessage,
66+
"optionsOverride": {
67+
"outputFormatters": [[outputFormatter]]
68+
}
69+
};
70+
markdownlintCli2(parameters).then(
71+
(code) => code && core.setFailed(`Failed with exit code: ${code}`),
72+
(error) => core.setFailed(`Failed due to error: ${error}`)
73+
);

0 commit comments

Comments
 (0)