mirror of
https://github.com/tj-actions/changed-files
synced 2025-03-05 11:06:22 +00:00
fix: excluding current dir with max depth less than 2 (#1375)
Co-authored-by: tj-actions[bot] <109116665+tj-actions-bot@users.noreply.github.com> Co-authored-by: GitHub Action <action@github.com>
This commit is contained in:
parent
ef327f98b5
commit
2a968ff601
4 changed files with 6 additions and 5 deletions
1
.github/workflows/test.yml
vendored
1
.github/workflows/test.yml
vendored
|
@ -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) }}'
|
||||
|
|
4
dist/index.js
generated
vendored
4
dist/index.js
generated
vendored
|
@ -170,7 +170,7 @@ function* getChangeTypeFilesGenerator({ inputs, changedFiles, changeTypes }) {
|
|||
const getChangeTypeFiles = ({ inputs, changedFiles, changeTypes }) => __awaiter(void 0, void 0, void 0, function* () {
|
||||
const files = [
|
||||
...new Set(getChangeTypeFilesGenerator({ inputs, changedFiles, changeTypes }))
|
||||
];
|
||||
].filter(Boolean);
|
||||
if (inputs.json) {
|
||||
return {
|
||||
paths: (0, utils_1.jsonOutput)({ value: files, shouldEscape: inputs.escapeJson }),
|
||||
|
@ -200,7 +200,7 @@ function* getAllChangeTypeFilesGenerator({ inputs, changedFiles }) {
|
|||
const getAllChangeTypeFiles = ({ inputs, changedFiles }) => __awaiter(void 0, void 0, void 0, function* () {
|
||||
const files = [
|
||||
...new Set(getAllChangeTypeFilesGenerator({ inputs, changedFiles }))
|
||||
];
|
||||
].filter(Boolean);
|
||||
if (inputs.json) {
|
||||
return {
|
||||
paths: (0, utils_1.jsonOutput)({ value: files, shouldEscape: inputs.escapeJson }),
|
||||
|
|
2
dist/index.js.map
generated
vendored
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
|
@ -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 {
|
||||
|
@ -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 {
|
||||
|
|
Loading…
Add table
Reference in a new issue