Skip to content

Commit 7ec240b

Browse files
committed
fix input somehow
1 parent fb2b962 commit 7ec240b

File tree

3 files changed

+13
-14
lines changed

3 files changed

+13
-14
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
id: test-action
5858
uses: ./
5959
with:
60-
milliseconds: 2000
60+
ignore-default: true
6161

6262
- name: Print Output
6363
id: output

CODEOWNERS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,6 @@
55

66
# Default owners, unless a later match takes precedence.
77
* @joelharkes
8+
9+
10+
/dist/ @joelharkes

src/main.ts

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,18 @@ interface Input {
88
files: string;
99
}
1010

11-
export function getInputs(): Input {
11+
function getInputs(): Input {
1212
const result = {} as Input;
13-
result['include-gitignore'] = core.getBooleanInput('include-gitignore');
14-
result['ignore-default'] = core.getBooleanInput('ignore-default');
13+
result['include-gitignore'] = getBoolInput('include-gitignore');
14+
result['ignore-default'] = getBoolInput('ignore-default');
1515
result.files = core.getInput('files');
1616
return result;
1717
}
1818

19+
function getBoolInput(name: string): boolean {
20+
return core.getInput(name)?.toLowerCase() === 'true';
21+
}
22+
1923
export const runAction = async (input: Input): Promise<void> => {
2024
let filesToCheck: string[] = [];
2125
core.startGroup(`Loading files to check.`);
@@ -103,16 +107,8 @@ export const runAction = async (input: Input): Promise<void> => {
103107
};
104108

105109
export async function run(): Promise<void> {
106-
try {
107-
const input = getInputs();
108-
return runAction(input);
109-
} catch (error) {
110-
core.startGroup(
111-
error instanceof Error ? error.message : JSON.stringify(error),
112-
);
113-
core.info(JSON.stringify(error, null, 2));
114-
core.endGroup();
115-
}
110+
const input = getInputs();
111+
return runAction(input);
116112
}
117113

118114
function getCodeownerContent(): string {

0 commit comments

Comments
 (0)