Skip to content

Commit

Permalink
fix: excluding current dir with max depth less than 2 (#1375)
Browse files Browse the repository at this point in the history
Co-authored-by: tj-actions[bot] <109116665+tj-actions-bot@users.noreply.github.com>
Co-authored-by: GitHub Action <action@github.com>
  • Loading branch information
3 people committed Jul 13, 2023
1 parent ef327f9 commit 2a968ff
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -914,6 +914,7 @@ jobs:
fetch_depth: 60000
dir_names: "true"
dir_names_max_depth: 3
dir_names_exclude_current_dir: "true"
- name: Show output
run: |
echo '${{ toJSON(steps.changed-files-dir-names-max-depth.outputs) }}'
Expand Down
4 changes: 2 additions & 2 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/changedFiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ export const getChangeTypeFiles = async ({
}): Promise<{paths: string; count: string}> => {
const files = [
...new Set(getChangeTypeFilesGenerator({inputs, changedFiles, changeTypes}))
]
].filter(Boolean)

if (inputs.json) {
return {
Expand Down Expand Up @@ -236,7 +236,7 @@ export const getAllChangeTypeFiles = async ({
}): Promise<{paths: string; count: string}> => {
const files = [
...new Set(getAllChangeTypeFilesGenerator({inputs, changedFiles}))
]
].filter(Boolean)

if (inputs.json) {
return {
Expand Down

0 comments on commit 2a968ff

Please sign in to comment.