@@ -8,14 +8,18 @@ interface Input {
8
8
files : string ;
9
9
}
10
10
11
- export function getInputs ( ) : Input {
11
+ function getInputs ( ) : Input {
12
12
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' ) ;
15
15
result . files = core . getInput ( 'files' ) ;
16
16
return result ;
17
17
}
18
18
19
+ function getBoolInput ( name : string ) : boolean {
20
+ return core . getInput ( name ) ?. toLowerCase ( ) === 'true' ;
21
+ }
22
+
19
23
export const runAction = async ( input : Input ) : Promise < void > => {
20
24
let filesToCheck : string [ ] = [ ] ;
21
25
core . startGroup ( `Loading files to check.` ) ;
@@ -103,16 +107,8 @@ export const runAction = async (input: Input): Promise<void> => {
103
107
} ;
104
108
105
109
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 ) ;
116
112
}
117
113
118
114
function getCodeownerContent ( ) : string {
0 commit comments