3
0
Fork 0
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:
Tonye Jack 2023-07-13 13:01:23 -06:00 committed by GitHub
parent ef327f98b5
commit 2a968ff601
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 5 deletions

View file

@ -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
View file

@ -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

File diff suppressed because one or more lines are too long

View file

@ -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 {