Skip to content

Commit

Permalink
feat: Expose includes variable to actions (#392)
Browse files Browse the repository at this point in the history
This PR exposes the includes option to the action
  • Loading branch information
bmaximuml authored Jan 12, 2024
1 parent 80756fe commit 670d636
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ You can configure `codeowners-generator` from several places:

### CLI options

- **includes** (`--includes`): The glob used to find CODEOWNERS files in the repo `default: ['**/CODEOWNERS', '!CODEOWNERS', '!node_modules']`
- **includes** (`--includes`): The glob used to find CODEOWNERS files in the repo `default: ['**/CODEOWNERS', '!CODEOWNERS', '!.github/CODEOWNERS', '!docs/CODEOWNERS', '!node_modules']`

- **output** (`--output`): The output path and name of the file `default: CODEOWNERS`

Expand Down
8 changes: 8 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ inputs:
description: Keep the generated block in the same position it was found in the CODEOWNERS file (if present). Useful for when you make manual additions.
required: false
default: 'false'
includes:
description: The glob used to find CODEOWNERS files in the repo. Defaults to the value in src/utils/constants.ts
required: false
default: ''
version:
description: codeowners-generator version. It will default to the latest in npm otherwise'
required: false
Expand Down Expand Up @@ -62,6 +66,10 @@ runs:
ARGS_INPUT+=("--preserve-block-position")
fi
if [ "${{inputs.includes}}" ]; then
ARGS_INPUT+=("--includes ${{inputs.includes}}")
fi
if [ ! -z "${{inputs.version}}" ]; then
VERSION="${{inputs.version}}"
fi
Expand Down

0 comments on commit 670d636

Please sign in to comment.