Skip to content

Commit 2eaa4a9

Browse files
committed
cleanup
1 parent 5aac9f3 commit 2eaa4a9

File tree

8 files changed

+29
-29
lines changed

8 files changed

+29
-29
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-
ignore-default: true
60+
ignoreDefault: true
6161

6262
- name: Print Output
6363
id: output

__tests__/main.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ const { runAction } = await import('../src/main.js');
1818
test('run action', async () => {
1919
core.isDebug.mockReturnValue(false);
2020
return runAction({
21-
'include-gitignore': false,
22-
'ignore-default': false,
21+
includeGitignore: false,
22+
ignoreDefault: false,
2323
files: '',
2424
allRulesMustHit: false,
2525
});

action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ branding:
1010

1111
# Define your inputs here.
1212
inputs:
13-
include-gitignore:
13+
includeGitignore:
1414
description: Wether or not to exclude files from .gitignore.
1515
required: false
1616
default: 'false'
17-
ignore-default:
17+
ignoreDefault:
1818
description: Wether to ignore the default * CODEOWNERS line.
1919
required: false
2020
default: 'false'

badges/coverage.svg

Lines changed: 1 addition & 1 deletion
Loading

dist/index.js

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/main.d.ts

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,21 @@ import { readFileSync, existsSync } from 'fs';
44
import { parseCodeowners } from './codeowner.js';
55

66
interface Input {
7-
'include-gitignore': boolean;
8-
'ignore-default': boolean;
7+
includeGitignore: boolean;
8+
ignoreDefault: boolean;
99
files: string;
1010
allRulesMustHit: boolean;
1111
codeownersContent?: string;
1212
}
1313

1414
function getInputs(): Input {
15-
const result = {} as Input;
16-
result['include-gitignore'] = getBoolInput('include-gitignore');
17-
result['ignore-default'] = getBoolInput('ignore-default');
18-
result.allRulesMustHit = getBoolInput('allRulesMustHit');
19-
result.files = core.getInput('files');
20-
result.codeownersContent = core.getInput('codeownersContent');
21-
return result;
15+
return {
16+
includeGitignore: getBoolInput('includeGitignore'),
17+
ignoreDefault: getBoolInput('ignoreDefault'),
18+
allRulesMustHit: getBoolInput('allRulesMustHit'),
19+
files: core.getInput('files'),
20+
codeownersContent: core.getInput('codeownersContent'),
21+
};
2222
}
2323

2424
function getBoolInput(name: string): boolean {
@@ -34,7 +34,7 @@ export const runAction = async (input: Input): Promise<void> => {
3434
.map((file) => (file.startsWith('/') ? file : `/${file}`));
3535
} else {
3636
filesToCheck = await (await glob.create('*')).glob();
37-
if (input['include-gitignore'] === true) {
37+
if (input['includeGitignore'] === true) {
3838
core.info('Ignoring .gitignored files');
3939
let gitIgnoreFiles: string[] = [];
4040
if (!existsSync('.gitignore')) {
@@ -62,7 +62,7 @@ export const runAction = async (input: Input): Promise<void> => {
6262
core.startGroup('Parsing CODEOWNERS File');
6363
const codeownerContent = input.codeownersContent || getCodeownerContent();
6464
let parsedCodeowners = parseCodeowners(codeownerContent);
65-
if (input['ignore-default'] === true) {
65+
if (input['ignoreDefault'] === true) {
6666
parsedCodeowners = parsedCodeowners.filter((rule) => rule.pattern !== '*');
6767
}
6868
core.info(`CODEOWNERS Rules: ${parsedCodeowners.length}`);

0 commit comments

Comments
 (0)