Compare commits
33 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8238a41032 | ||
|
|
aaf4339aa1 | ||
|
|
d2486b470f | ||
|
|
e7fd9e59a4 | ||
|
|
e3cc088a96 | ||
|
|
72d7089b72 | ||
|
|
e94da5a065 | ||
|
|
a721d001dd | ||
|
|
8af3110d4d | ||
|
|
a351a301d2 | ||
|
|
62a23f82b1 | ||
|
|
ef42e5ad18 | ||
|
|
cd1e384723 | ||
|
|
a52f8621d2 | ||
|
|
920856cfdd | ||
|
|
08906b3254 | ||
|
|
cd35eace22 | ||
|
|
8296c33fd0 | ||
|
|
0ad71b9855 | ||
|
|
c98e6d20fc | ||
|
|
2398551415 | ||
|
|
060b3b9b03 | ||
|
|
ff65504325 | ||
|
|
543c1a25c6 | ||
|
|
1be42003d7 | ||
|
|
2325baada3 | ||
|
|
e6ce728d79 | ||
|
|
0b947ed818 | ||
|
|
e8dbf6d670 | ||
|
|
41c232aad8 | ||
|
|
4196030939 | ||
|
|
bbe796033e | ||
|
|
159562dc02 |
2
.github/workflows/codacy-analysis.yml
vendored
2
.github/workflows/codacy-analysis.yml
vendored
@@ -29,7 +29,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
# Checkout the repository to the GitHub Actions runner
|
# Checkout the repository to the GitHub Actions runner
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
|
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
|
||||||
|
|
||||||
# Execute Codacy Analysis CLI and generate a SARIF output with the security issues identified during the analysis
|
# Execute Codacy Analysis CLI and generate a SARIF output with the security issues identified during the analysis
|
||||||
- name: Run Codacy Analysis CLI
|
- name: Run Codacy Analysis CLI
|
||||||
|
|||||||
2
.github/workflows/codeql.yml
vendored
2
.github/workflows/codeql.yml
vendored
@@ -38,7 +38,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
|
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
|
||||||
|
|
||||||
# Initializes the CodeQL tools for scanning.
|
# Initializes the CodeQL tools for scanning.
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
|
|||||||
2
.github/workflows/manual-test.yml
vendored
2
.github/workflows/manual-test.yml
vendored
@@ -16,7 +16,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
|
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|||||||
4
.github/workflows/matrix-test.yml
vendored
4
.github/workflows/matrix-test.yml
vendored
@@ -14,7 +14,7 @@ jobs:
|
|||||||
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
|
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Get changed files
|
- name: Get changed files
|
||||||
@@ -38,7 +38,7 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
|
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
|
||||||
- name: Test
|
- name: Test
|
||||||
run: |
|
run: |
|
||||||
echo ${{ matrix.files }}
|
echo ${{ matrix.files }}
|
||||||
|
|||||||
2
.github/workflows/sync-release-version.yml
vendored
2
.github/workflows/sync-release-version.yml
vendored
@@ -8,7 +8,7 @@ jobs:
|
|||||||
update-version:
|
update-version:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
|
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Run release-tagger
|
- name: Run release-tagger
|
||||||
|
|||||||
80
.github/workflows/test.yml
vendored
80
.github/workflows/test.yml
vendored
@@ -811,7 +811,81 @@ jobs:
|
|||||||
else
|
else
|
||||||
cat "deleted_files/test/test deleted.txt"
|
cat "deleted_files/test/test deleted.txt"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
test-dir-names-deleted-files-include-only-deleted-dirs-single-file:
|
||||||
|
name: Test dir names deleted files include only deleted dirs single file
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: build
|
||||||
|
if: needs.build.outputs.files_changed != 'true'
|
||||||
|
steps:
|
||||||
|
- name: Checkout branch
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: a52f8621d26d5d9f54b80f74bda2d9eedff94693
|
||||||
|
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||||
|
submodules: true
|
||||||
|
fetch-depth: 2
|
||||||
|
- name: Run changed-files with dir_names and dir_names_deleted_files_include_only_deleted_dirs with a single file deleted withing the test directory
|
||||||
|
id: changed-files-dir-names-deleted-files-include-only-deleted-dirs-single-file
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
base_sha: 920856cfdd4b4be17810e34b197596397473adf6
|
||||||
|
sha: a52f8621d26d5d9f54b80f74bda2d9eedff94693
|
||||||
|
dir_names: true
|
||||||
|
dir_names_deleted_files_include_only_deleted_dirs: true
|
||||||
|
- name: Show output
|
||||||
|
run: |
|
||||||
|
echo '${{ toJSON(steps.changed-files-dir-names-deleted-files-include-only-deleted-dirs-single-file.outputs) }}'
|
||||||
|
shell:
|
||||||
|
bash
|
||||||
|
- name: Check deleted_files output
|
||||||
|
if: steps.changed-files-dir-names-deleted-files-include-only-deleted-dirs-single-file.outputs.deleted_files != ''
|
||||||
|
run: |
|
||||||
|
echo "Invalid output: Expected '' got (${{ steps.changed-files-dir-names-deleted-files-include-only-deleted-dirs-single-file.outputs.deleted_files }})"
|
||||||
|
exit 1
|
||||||
|
shell:
|
||||||
|
bash
|
||||||
|
test-dir-names-deleted-files-include-only-deleted-dirs-directory:
|
||||||
|
name: Test dir names deleted files include only deleted dirs
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: build
|
||||||
|
if: needs.build.outputs.files_changed != 'true'
|
||||||
|
steps:
|
||||||
|
- name: Checkout branch
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: cd1e384723e4d1a184568182ac2b27c53ebf017f
|
||||||
|
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||||
|
submodules: true
|
||||||
|
fetch-depth: 2
|
||||||
|
- name: Run changed-files with dir_names and dir_names_deleted_files_include_only_deleted_dirs with the test directory deleted
|
||||||
|
id: changed-files-dir-names-deleted-files-include-only-deleted-dirs-directory
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
base_sha: a52f8621d26d5d9f54b80f74bda2d9eedff94693
|
||||||
|
sha: cd1e384723e4d1a184568182ac2b27c53ebf017f
|
||||||
|
dir_names: true
|
||||||
|
dir_names_deleted_files_include_only_deleted_dirs: true
|
||||||
|
- name: Show output
|
||||||
|
run: |
|
||||||
|
echo '${{ toJSON(steps.changed-files-dir-names-deleted-files-include-only-deleted-dirs-directory.outputs) }}'
|
||||||
|
shell:
|
||||||
|
bash
|
||||||
|
- name: Check deleted_files output on non windows platform
|
||||||
|
if: steps.changed-files-dir-names-deleted-files-include-only-deleted-dirs-directory.outputs.deleted_files != 'test/test3' && runner.os != 'Windows'
|
||||||
|
run: |
|
||||||
|
echo "Invalid output: Expected (test/test3) got (${{ steps.changed-files-dir-names-deleted-files-include-only-deleted-dirs-directory.outputs.deleted_files }})"
|
||||||
|
exit 1
|
||||||
|
shell:
|
||||||
|
bash
|
||||||
|
- name: Check deleted_files output on windows platform
|
||||||
|
if: "!contains(steps.changed-files-dir-names-deleted-files-include-only-deleted-dirs-directory.outputs.deleted_files, 'test\\test3') && runner.os == 'Windows'"
|
||||||
|
run: |
|
||||||
|
echo "Invalid output: Expected (test\\test3) got (${{ steps.changed-files-dir-names-deleted-files-include-only-deleted-dirs-directory.outputs.deleted_files }})"
|
||||||
|
exit 1
|
||||||
|
shell:
|
||||||
|
bash
|
||||||
|
|
||||||
test-since-last-remote-commit:
|
test-since-last-remote-commit:
|
||||||
name: Test changed-files since last remote commit
|
name: Test changed-files since last remote commit
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -1423,14 +1497,14 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
shell:
|
shell:
|
||||||
bash
|
bash
|
||||||
- name: Check if a excluded file is not included in any_deleted on non windows platform
|
- name: Check if an excluded file is included in deleted_files output on non windows platform
|
||||||
if: "contains(steps.changed-files-specific.outputs.deleted_files, 'test/test/test.txt') && runner.os != 'Windows'"
|
if: "contains(steps.changed-files-specific.outputs.deleted_files, 'test/test/test.txt') && runner.os != 'Windows'"
|
||||||
run: |
|
run: |
|
||||||
echo "Invalid output: Expected not to include (test/test/test.txt) got (${{ steps.changed-files-specific.outputs.deleted_files }})"
|
echo "Invalid output: Expected not to include (test/test/test.txt) got (${{ steps.changed-files-specific.outputs.deleted_files }})"
|
||||||
exit 1
|
exit 1
|
||||||
shell:
|
shell:
|
||||||
bash
|
bash
|
||||||
- name: Check if a excluded file is not included in any_deleted on windows platform
|
- name: Check if an excluded file is included in deleted_files output on windows platform
|
||||||
if: "contains(steps.changed-files-specific.outputs.deleted_files, 'test\\test\\test.txt') && runner.os == 'Windows'"
|
if: "contains(steps.changed-files-specific.outputs.deleted_files, 'test\\test\\test.txt') && runner.os == 'Windows'"
|
||||||
run: |
|
run: |
|
||||||
echo "Invalid output: Expected not to include (test\\test\\test.txt) got (${{ steps.changed-files-specific.outputs.deleted_files }})"
|
echo "Invalid output: Expected not to include (test\\test\\test.txt) got (${{ steps.changed-files-specific.outputs.deleted_files }})"
|
||||||
|
|||||||
2
.github/workflows/update-readme.yml
vendored
2
.github/workflows/update-readme.yml
vendored
@@ -9,7 +9,7 @@ jobs:
|
|||||||
sync-assets:
|
sync-assets:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
|
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
|
|||||||
43
HISTORY.md
43
HISTORY.md
@@ -1,5 +1,48 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
# [39.1.2](https://github.com/tj-actions/changed-files/compare/v39.1.1...v39.1.2) - (2023-09-20)
|
||||||
|
|
||||||
|
## <!-- 7 -->⚙️ Miscellaneous Tasks
|
||||||
|
|
||||||
|
- Add warrning message to diff error ([#1593](https://github.com/tj-actions/changed-files/issues/1593)) ([4196030](https://github.com/tj-actions/changed-files/commit/41960309398d165631f08c5df47a11147e14712b)) - (Tonye Jack)
|
||||||
|
- **deps:** Update dependency @types/node to v20.6.3 ([bbe7960](https://github.com/tj-actions/changed-files/commit/bbe796033ec7cd22e0e20315c172c13048fc437c)) - (renovate[bot])
|
||||||
|
|
||||||
|
## <!-- 9 -->⬆️ Upgrades
|
||||||
|
|
||||||
|
- Upgraded to v39.1.1 ([#1591](https://github.com/tj-actions/changed-files/issues/1591))
|
||||||
|
|
||||||
|
Co-authored-by: jackton1 <jackton1@users.noreply.github.com> ([159562d](https://github.com/tj-actions/changed-files/commit/159562dc02e645a8a858fca8e12f289e65d30fa5)) - (tj-actions[bot])
|
||||||
|
|
||||||
|
# [39.1.1](https://github.com/tj-actions/changed-files/compare/v39.1.0...v39.1.1) - (2023-09-19)
|
||||||
|
|
||||||
|
## <!-- 1 -->🐛 Bug Fixes
|
||||||
|
|
||||||
|
- Changed_keys and modified_keys output to handle json and escape_json inputs ([#1585](https://github.com/tj-actions/changed-files/issues/1585)) ([951140b](https://github.com/tj-actions/changed-files/commit/951140b94a6a58dd2c62d7fb0b4d73898c79b196)) - (Arthur)
|
||||||
|
- Error with test ([#1589](https://github.com/tj-actions/changed-files/issues/1589)) ([dbf0700](https://github.com/tj-actions/changed-files/commit/dbf0700c7ac336b1ceed2ac8fe1b02d4cd3ac84f)) - (Tonye Jack)
|
||||||
|
|
||||||
|
## <!-- 26 -->🔄 Update
|
||||||
|
|
||||||
|
- Update test.yml ([a21a533](https://github.com/tj-actions/changed-files/commit/a21a533a0c244a27daac02f9dc6fcf8aeb996154)) - (Tonye Jack)
|
||||||
|
- Updated README.md ([#1588](https://github.com/tj-actions/changed-files/issues/1588))
|
||||||
|
|
||||||
|
Co-authored-by: jackton1 <jackton1@users.noreply.github.com> ([dacbaeb](https://github.com/tj-actions/changed-files/commit/dacbaebcaf9428d083702ffa9b449bac799dd2c3)) - (tj-actions[bot])
|
||||||
|
|
||||||
|
## <!-- 3 -->📚 Documentation
|
||||||
|
|
||||||
|
- Add V0lantis as a contributor for bug ([#1587](https://github.com/tj-actions/changed-files/issues/1587)) ([36ab2fe](https://github.com/tj-actions/changed-files/commit/36ab2fe9c2c58212caac6853d9b8e205a4d5c84b)) - (allcontributors[bot])
|
||||||
|
|
||||||
|
## <!-- 7 -->⚙️ Miscellaneous Tasks
|
||||||
|
|
||||||
|
- Add codacy config ([#1590](https://github.com/tj-actions/changed-files/issues/1590)) ([eeb169a](https://github.com/tj-actions/changed-files/commit/eeb169a9f925d0d92ff3dea3ac356ff0d5f288a8)) - (Tonye Jack)
|
||||||
|
- Update test.yml ([#1586](https://github.com/tj-actions/changed-files/issues/1586)) ([7e3a4ba](https://github.com/tj-actions/changed-files/commit/7e3a4bac80a0d6fdd60b44fea0dc5fa781ca8177)) - (Tonye Jack)
|
||||||
|
- Move variable declaration ([#1584](https://github.com/tj-actions/changed-files/issues/1584)) ([dcbe980](https://github.com/tj-actions/changed-files/commit/dcbe9805f4bb9e5128d8c802e2517943b4c09aa0)) - (Tonye Jack)
|
||||||
|
|
||||||
|
## <!-- 9 -->⬆️ Upgrades
|
||||||
|
|
||||||
|
- Upgraded to v39.1.0 ([#1583](https://github.com/tj-actions/changed-files/issues/1583))
|
||||||
|
|
||||||
|
Co-authored-by: jackton1 <jackton1@users.noreply.github.com> ([fd73c12](https://github.com/tj-actions/changed-files/commit/fd73c1248c8bebea8b243083223002698432c2a0)) - (tj-actions[bot])
|
||||||
|
|
||||||
# [39.1.0](https://github.com/tj-actions/changed-files/compare/v39.0.3...v39.1.0) - (2023-09-18)
|
# [39.1.0](https://github.com/tj-actions/changed-files/compare/v39.0.3...v39.1.0) - (2023-09-18)
|
||||||
|
|
||||||
## <!-- 0 -->🚀 Features
|
## <!-- 0 -->🚀 Features
|
||||||
|
|||||||
106
README.md
106
README.md
@@ -5,7 +5,6 @@
|
|||||||
|
|
||||||
[](https://www.codacy.com/gh/tj-actions/changed-files/dashboard?utm_source=github.com\&utm_medium=referral\&utm_content=tj-actions/changed-files\&utm_campaign=Badge_Grade)
|
[](https://www.codacy.com/gh/tj-actions/changed-files/dashboard?utm_source=github.com\&utm_medium=referral\&utm_content=tj-actions/changed-files\&utm_campaign=Badge_Grade)
|
||||||
[](https://github.com/tj-actions/changed-files/actions/workflows/test.yml)
|
[](https://github.com/tj-actions/changed-files/actions/workflows/test.yml)
|
||||||
[](https://github.com/tj-actions/changed-files/actions/workflows/sync-release-version.yml)
|
|
||||||
|
|
||||||
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
|
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
|
||||||
|
|
||||||
@@ -82,7 +81,7 @@ And many more...
|
|||||||
> * For mono repositories where pulling all branch history might not be desired, you can still use the default [`fetch-depth`](https://github.com/actions/checkout#usage), which is set to `1` for `pull_request` events.
|
> * For mono repositories where pulling all branch history might not be desired, you can still use the default [`fetch-depth`](https://github.com/actions/checkout#usage), which is set to `1` for `pull_request` events.
|
||||||
> * Avoid using single or double quotes for multiline inputs, as the value is already a string separated by a newline character. See [Examples](#examples) for more information.
|
> * Avoid using single or double quotes for multiline inputs, as the value is already a string separated by a newline character. See [Examples](#examples) for more information.
|
||||||
> * If [`fetch-depth`](https://github.com/actions/checkout#usage) isn't set to `0`, ensure that `persist-credentials` is set to `true` when configuring [`actions/checkout`](https://github.com/actions/checkout#usage).
|
> * If [`fetch-depth`](https://github.com/actions/checkout#usage) isn't set to `0`, ensure that `persist-credentials` is set to `true` when configuring [`actions/checkout`](https://github.com/actions/checkout#usage).
|
||||||
> * For repositories that have PRs generated from forks, when configuring [`actions/checkout`](https://github.com/actions/checkout#usage), set the [`repository`](https://github.com/actions/checkout#usage) to `${{ github.event.pull_request.head.repo.full_name }}`. See [Example](https://github.com/tj-actions/changed-files/blob/main/.github/workflows/test.yml#L47-L51).
|
> * For repositories that have PRs generated from forks, when configuring [`actions/checkout`](https://github.com/actions/checkout#usage), set the [`repository`](https://github.com/actions/checkout#usage) to `${{ github.event.pull_request.head.repo.full_name }}`. See [Example](https://github.com/tj-actions/changed-files/blob/main/.github/workflows/test.yml#L49-L53).
|
||||||
|
|
||||||
Visit the [discussions for more information](https://github.com/tj-actions/changed-files/discussions) or [create a new discussion](https://github.com/tj-actions/changed-files/discussions/new/choose) for usage-related questions.
|
Visit the [discussions for more information](https://github.com/tj-actions/changed-files/discussions) or [create a new discussion](https://github.com/tj-actions/changed-files/discussions/new/choose) for usage-related questions.
|
||||||
|
|
||||||
@@ -354,57 +353,58 @@ Support this project with a :star:
|
|||||||
|
|
||||||
<!-- AUTO-DOC-INPUT:START - Do not remove or modify this section -->
|
<!-- AUTO-DOC-INPUT:START - Do not remove or modify this section -->
|
||||||
|
|
||||||
| INPUT | TYPE | REQUIRED | DEFAULT | DESCRIPTION |
|
| INPUT | TYPE | REQUIRED | DEFAULT | DESCRIPTION |
|
||||||
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------|----------|---------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------|----------|---------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||||
| <a name="input_api_url"></a>[api\_url](#input_api_url) | string | false | `"${{ github.api_url }}"` | Github API URL. |
|
| <a name="input_api_url"></a>[api\_url](#input_api_url) | string | false | `"${{ github.api_url }}"` | Github API URL. |
|
||||||
| <a name="input_base_sha"></a>[base\_sha](#input_base_sha) | string | false | | Specify a different base commit <br>SHA used for comparing changes |
|
| <a name="input_base_sha"></a>[base\_sha](#input_base_sha) | string | false | | Specify a different base commit <br>SHA used for comparing changes |
|
||||||
| <a name="input_diff_relative"></a>[diff\_relative](#input_diff_relative) | string | false | `"true"` | Exclude changes outside the current <br>directory and show path names <br>relative to it. **NOTE:** This <br>requires you to specify the <br>top level directory via the <br>`path` input. |
|
| <a name="input_diff_relative"></a>[diff\_relative](#input_diff_relative) | string | false | `"true"` | Exclude changes outside the current <br>directory and show path names <br>relative to it. **NOTE:** This <br>requires you to specify the <br>top level directory via the <br>`path` input. |
|
||||||
| <a name="input_dir_names"></a>[dir\_names](#input_dir_names) | string | false | `"false"` | Output unique changed directories instead <br>of filenames. **NOTE:** This returns <br>`.` for changed files located <br>in the current working directory <br>which defaults to `$GITHUB_WORKSPACE`. |
|
| <a name="input_dir_names"></a>[dir\_names](#input_dir_names) | string | false | `"false"` | Output unique changed directories instead <br>of filenames. **NOTE:** This returns <br>`.` for changed files located <br>in the current working directory <br>which defaults to `$GITHUB_WORKSPACE`. |
|
||||||
| <a name="input_dir_names_exclude_current_dir"></a>[dir\_names\_exclude\_current\_dir](#input_dir_names_exclude_current_dir) | string | false | `"false"` | Exclude the current directory represented <br>by `.` from the output <br>when `dir_names` is set to <br>`true`. |
|
| <a name="input_dir_names_deleted_files_include_only_deleted_dirs"></a>[dir\_names\_deleted\_files\_include\_only\_deleted\_dirs](#input_dir_names_deleted_files_include_only_deleted_dirs) | string | false | `"false"` | Include only directories that have <br>been deleted as opposed to <br>directory names of files that <br>have been deleted in the <br>`deleted_files` output when `dir_names` is <br>set to `true`. |
|
||||||
| <a name="input_dir_names_include_files"></a>[dir\_names\_include\_files](#input_dir_names_include_files) | string | false | | Include files in the output <br>when `dir_names` is set to <br>`true`. **NOTE:** This returns only <br>the matching files and also <br>the directory names. |
|
| <a name="input_dir_names_exclude_current_dir"></a>[dir\_names\_exclude\_current\_dir](#input_dir_names_exclude_current_dir) | string | false | `"false"` | Exclude the current directory represented <br>by `.` from the output <br>when `dir_names` is set to <br>`true`. |
|
||||||
| <a name="input_dir_names_include_files_separator"></a>[dir\_names\_include\_files\_separator](#input_dir_names_include_files_separator) | string | false | `"\n"` | Separator used to split the <br>`dir_names_include_files` input |
|
| <a name="input_dir_names_include_files"></a>[dir\_names\_include\_files](#input_dir_names_include_files) | string | false | | Include files in the output <br>when `dir_names` is set to <br>`true`. **NOTE:** This returns only <br>the matching files and also <br>the directory names. |
|
||||||
| <a name="input_dir_names_max_depth"></a>[dir\_names\_max\_depth](#input_dir_names_max_depth) | string | false | | Limit the directory output to <br>a maximum depth e.g `test/test1/test2` <br>with max depth of `2` <br>returns `test/test1`. |
|
| <a name="input_dir_names_include_files_separator"></a>[dir\_names\_include\_files\_separator](#input_dir_names_include_files_separator) | string | false | `"\n"` | Separator used to split the <br>`dir_names_include_files` input |
|
||||||
| <a name="input_escape_json"></a>[escape\_json](#input_escape_json) | string | false | `"true"` | Escape JSON output. |
|
| <a name="input_dir_names_max_depth"></a>[dir\_names\_max\_depth](#input_dir_names_max_depth) | string | false | | Limit the directory output to <br>a maximum depth e.g `test/test1/test2` <br>with max depth of `2` <br>returns `test/test1`. |
|
||||||
| <a name="input_fail_on_initial_diff_error"></a>[fail\_on\_initial\_diff\_error](#input_fail_on_initial_diff_error) | string | false | `"false"` | Fail when the initial diff <br>fails. |
|
| <a name="input_escape_json"></a>[escape\_json](#input_escape_json) | string | false | `"true"` | Escape JSON output. |
|
||||||
| <a name="input_fail_on_submodule_diff_error"></a>[fail\_on\_submodule\_diff\_error](#input_fail_on_submodule_diff_error) | string | false | `"false"` | Fail when the submodule diff <br>fails. |
|
| <a name="input_fail_on_initial_diff_error"></a>[fail\_on\_initial\_diff\_error](#input_fail_on_initial_diff_error) | string | false | `"false"` | Fail when the initial diff <br>fails. |
|
||||||
| <a name="input_fetch_additional_submodule_history"></a>[fetch\_additional\_submodule\_history](#input_fetch_additional_submodule_history) | string | false | `"false"` | Fetch additional history for submodules. |
|
| <a name="input_fail_on_submodule_diff_error"></a>[fail\_on\_submodule\_diff\_error](#input_fail_on_submodule_diff_error) | string | false | `"false"` | Fail when the submodule diff <br>fails. |
|
||||||
| <a name="input_fetch_depth"></a>[fetch\_depth](#input_fetch_depth) | string | false | `"50"` | Depth of additional branch history <br>fetched. **NOTE**: This can be <br>adjusted to resolve errors with <br>insufficient history. |
|
| <a name="input_fetch_additional_submodule_history"></a>[fetch\_additional\_submodule\_history](#input_fetch_additional_submodule_history) | string | false | `"false"` | Fetch additional history for submodules. |
|
||||||
| <a name="input_files"></a>[files](#input_files) | string | false | | File and directory patterns used <br>to detect changes (Defaults to the entire repo if unset) **NOTE:** <br>Multiline file/directory patterns should not <br>include quotes. |
|
| <a name="input_fetch_depth"></a>[fetch\_depth](#input_fetch_depth) | string | false | `"50"` | Depth of additional branch history <br>fetched. **NOTE**: This can be <br>adjusted to resolve errors with <br>insufficient history. |
|
||||||
| <a name="input_files_from_source_file"></a>[files\_from\_source\_file](#input_files_from_source_file) | string | false | | Source file(s) used to populate <br>the `files` input. |
|
| <a name="input_files"></a>[files](#input_files) | string | false | | File and directory patterns used <br>to detect changes (Defaults to the entire repo if unset) **NOTE:** <br>Multiline file/directory patterns should not <br>include quotes. |
|
||||||
| <a name="input_files_from_source_file_separator"></a>[files\_from\_source\_file\_separator](#input_files_from_source_file_separator) | string | false | `"\n"` | Separator used to split the <br>`files_from_source_file` input |
|
| <a name="input_files_from_source_file"></a>[files\_from\_source\_file](#input_files_from_source_file) | string | false | | Source file(s) used to populate <br>the `files` input. |
|
||||||
| <a name="input_files_ignore"></a>[files\_ignore](#input_files_ignore) | string | false | | Ignore changes to these file(s) <br>**NOTE:** Multiline file/directory patterns should <br>not include quotes. |
|
| <a name="input_files_from_source_file_separator"></a>[files\_from\_source\_file\_separator](#input_files_from_source_file_separator) | string | false | `"\n"` | Separator used to split the <br>`files_from_source_file` input |
|
||||||
| <a name="input_files_ignore_from_source_file"></a>[files\_ignore\_from\_source\_file](#input_files_ignore_from_source_file) | string | false | | Source file(s) used to populate <br>the `files_ignore` input |
|
| <a name="input_files_ignore"></a>[files\_ignore](#input_files_ignore) | string | false | | Ignore changes to these file(s) <br>**NOTE:** Multiline file/directory patterns should <br>not include quotes. |
|
||||||
| <a name="input_files_ignore_from_source_file_separator"></a>[files\_ignore\_from\_source\_file\_separator](#input_files_ignore_from_source_file_separator) | string | false | `"\n"` | Separator used to split the <br>`files_ignore_from_source_file` input |
|
| <a name="input_files_ignore_from_source_file"></a>[files\_ignore\_from\_source\_file](#input_files_ignore_from_source_file) | string | false | | Source file(s) used to populate <br>the `files_ignore` input |
|
||||||
| <a name="input_files_ignore_separator"></a>[files\_ignore\_separator](#input_files_ignore_separator) | string | false | `"\n"` | Separator used to split the <br>`files_ignore` input |
|
| <a name="input_files_ignore_from_source_file_separator"></a>[files\_ignore\_from\_source\_file\_separator](#input_files_ignore_from_source_file_separator) | string | false | `"\n"` | Separator used to split the <br>`files_ignore_from_source_file` input |
|
||||||
| <a name="input_files_ignore_yaml"></a>[files\_ignore\_yaml](#input_files_ignore_yaml) | string | false | | YAML used to define a <br>set of file patterns to <br>ignore changes |
|
| <a name="input_files_ignore_separator"></a>[files\_ignore\_separator](#input_files_ignore_separator) | string | false | `"\n"` | Separator used to split the <br>`files_ignore` input |
|
||||||
| <a name="input_files_ignore_yaml_from_source_file"></a>[files\_ignore\_yaml\_from\_source\_file](#input_files_ignore_yaml_from_source_file) | string | false | | Source file(s) used to populate <br>the `files_ignore_yaml` input. [Example](https://github.com/tj-actions/changed-files/blob/main/test/changed-files.yml) |
|
| <a name="input_files_ignore_yaml"></a>[files\_ignore\_yaml](#input_files_ignore_yaml) | string | false | | YAML used to define a <br>set of file patterns to <br>ignore changes |
|
||||||
| <a name="input_files_ignore_yaml_from_source_file_separator"></a>[files\_ignore\_yaml\_from\_source\_file\_separator](#input_files_ignore_yaml_from_source_file_separator) | string | false | `"\n"` | Separator used to split the <br>`files_ignore_yaml_from_source_file` input |
|
| <a name="input_files_ignore_yaml_from_source_file"></a>[files\_ignore\_yaml\_from\_source\_file](#input_files_ignore_yaml_from_source_file) | string | false | | Source file(s) used to populate <br>the `files_ignore_yaml` input. [Example](https://github.com/tj-actions/changed-files/blob/main/test/changed-files.yml) |
|
||||||
| <a name="input_files_separator"></a>[files\_separator](#input_files_separator) | string | false | `"\n"` | Separator used to split the <br>`files` input |
|
| <a name="input_files_ignore_yaml_from_source_file_separator"></a>[files\_ignore\_yaml\_from\_source\_file\_separator](#input_files_ignore_yaml_from_source_file_separator) | string | false | `"\n"` | Separator used to split the <br>`files_ignore_yaml_from_source_file` input |
|
||||||
| <a name="input_files_yaml"></a>[files\_yaml](#input_files_yaml) | string | false | | YAML used to define a <br>set of file patterns to <br>detect changes |
|
| <a name="input_files_separator"></a>[files\_separator](#input_files_separator) | string | false | `"\n"` | Separator used to split the <br>`files` input |
|
||||||
| <a name="input_files_yaml_from_source_file"></a>[files\_yaml\_from\_source\_file](#input_files_yaml_from_source_file) | string | false | | Source file(s) used to populate <br>the `files_yaml` input. [Example](https://github.com/tj-actions/changed-files/blob/main/test/changed-files.yml) |
|
| <a name="input_files_yaml"></a>[files\_yaml](#input_files_yaml) | string | false | | YAML used to define a <br>set of file patterns to <br>detect changes |
|
||||||
| <a name="input_files_yaml_from_source_file_separator"></a>[files\_yaml\_from\_source\_file\_separator](#input_files_yaml_from_source_file_separator) | string | false | `"\n"` | Separator used to split the <br>`files_yaml_from_source_file` input |
|
| <a name="input_files_yaml_from_source_file"></a>[files\_yaml\_from\_source\_file](#input_files_yaml_from_source_file) | string | false | | Source file(s) used to populate <br>the `files_yaml` input. [Example](https://github.com/tj-actions/changed-files/blob/main/test/changed-files.yml) |
|
||||||
| <a name="input_include_all_old_new_renamed_files"></a>[include\_all\_old\_new\_renamed\_files](#input_include_all_old_new_renamed_files) | string | false | `"false"` | Include `all_old_new_renamed_files` output. Note this <br>can generate a large output <br>See: [#501](https://github.com/tj-actions/changed-files/issues/501). |
|
| <a name="input_files_yaml_from_source_file_separator"></a>[files\_yaml\_from\_source\_file\_separator](#input_files_yaml_from_source_file_separator) | string | false | `"\n"` | Separator used to split the <br>`files_yaml_from_source_file` input |
|
||||||
| <a name="input_json"></a>[json](#input_json) | string | false | `"false"` | Output list of changed files <br>in a JSON formatted string <br>which can be used for <br>matrix jobs. [Example](https://github.com/tj-actions/changed-files/blob/main/.github/workflows/matrix-test.yml) |
|
| <a name="input_include_all_old_new_renamed_files"></a>[include\_all\_old\_new\_renamed\_files](#input_include_all_old_new_renamed_files) | string | false | `"false"` | Include `all_old_new_renamed_files` output. Note this <br>can generate a large output <br>See: [#501](https://github.com/tj-actions/changed-files/issues/501). |
|
||||||
| <a name="input_old_new_files_separator"></a>[old\_new\_files\_separator](#input_old_new_files_separator) | string | false | `" "` | Split character for old and <br>new renamed filename pairs. |
|
| <a name="input_json"></a>[json](#input_json) | string | false | `"false"` | Output list of changed files <br>in a JSON formatted string <br>which can be used for <br>matrix jobs. [Example](https://github.com/tj-actions/changed-files/blob/main/.github/workflows/matrix-test.yml) |
|
||||||
| <a name="input_old_new_separator"></a>[old\_new\_separator](#input_old_new_separator) | string | false | `","` | Split character for old and <br>new filename pairs. |
|
| <a name="input_old_new_files_separator"></a>[old\_new\_files\_separator](#input_old_new_files_separator) | string | false | `" "` | Split character for old and <br>new renamed filename pairs. |
|
||||||
| <a name="input_output_dir"></a>[output\_dir](#input_output_dir) | string | false | `".github/outputs"` | Directory to store output files. |
|
| <a name="input_old_new_separator"></a>[old\_new\_separator](#input_old_new_separator) | string | false | `","` | Split character for old and <br>new filename pairs. |
|
||||||
| <a name="input_output_renamed_files_as_deleted_and_added"></a>[output\_renamed\_files\_as\_deleted\_and\_added](#input_output_renamed_files_as_deleted_and_added) | string | false | `"false"` | Output renamed files as deleted <br>and added files. |
|
| <a name="input_output_dir"></a>[output\_dir](#input_output_dir) | string | false | `".github/outputs"` | Directory to store output files. |
|
||||||
| <a name="input_path"></a>[path](#input_path) | string | false | `"."` | Specify a relative path under <br>`$GITHUB_WORKSPACE` to locate the repository. |
|
| <a name="input_output_renamed_files_as_deleted_and_added"></a>[output\_renamed\_files\_as\_deleted\_and\_added](#input_output_renamed_files_as_deleted_and_added) | string | false | `"false"` | Output renamed files as deleted <br>and added files. |
|
||||||
| <a name="input_quotepath"></a>[quotepath](#input_quotepath) | string | false | `"true"` | Use non-ascii characters to match <br>files and output the filenames <br>completely verbatim by setting this <br>to `false` |
|
| <a name="input_path"></a>[path](#input_path) | string | false | `"."` | Specify a relative path under <br>`$GITHUB_WORKSPACE` to locate the repository. |
|
||||||
| <a name="input_recover_deleted_files"></a>[recover\_deleted\_files](#input_recover_deleted_files) | string | false | `"false"` | Recover deleted files. |
|
| <a name="input_quotepath"></a>[quotepath](#input_quotepath) | string | false | `"true"` | Use non-ascii characters to match <br>files and output the filenames <br>completely verbatim by setting this <br>to `false` |
|
||||||
| <a name="input_recover_deleted_files_to_destination"></a>[recover\_deleted\_files\_to\_destination](#input_recover_deleted_files_to_destination) | string | false | | Recover deleted files to a <br>new destination directory, defaults to <br>the original location. |
|
| <a name="input_recover_deleted_files"></a>[recover\_deleted\_files](#input_recover_deleted_files) | string | false | `"false"` | Recover deleted files. |
|
||||||
| <a name="input_recover_files"></a>[recover\_files](#input_recover_files) | string | false | | File and directory patterns used <br>to recover deleted files, defaults <br>to the patterns provided via <br>the `files`, `files_from_source_file`, `files_ignore` and <br>`files_ignore_from_source_file` inputs or all deleted <br>files if no patterns are <br>provided. |
|
| <a name="input_recover_deleted_files_to_destination"></a>[recover\_deleted\_files\_to\_destination](#input_recover_deleted_files_to_destination) | string | false | | Recover deleted files to a <br>new destination directory, defaults to <br>the original location. |
|
||||||
| <a name="input_recover_files_ignore"></a>[recover\_files\_ignore](#input_recover_files_ignore) | string | false | | File and directory patterns to <br>ignore when recovering deleted files. |
|
| <a name="input_recover_files"></a>[recover\_files](#input_recover_files) | string | false | | File and directory patterns used <br>to recover deleted files, defaults <br>to the patterns provided via <br>the `files`, `files_from_source_file`, `files_ignore` and <br>`files_ignore_from_source_file` inputs or all deleted <br>files if no patterns are <br>provided. |
|
||||||
| <a name="input_recover_files_ignore_separator"></a>[recover\_files\_ignore\_separator](#input_recover_files_ignore_separator) | string | false | `"\n"` | Separator used to split the <br>`recover_files_ignore` input |
|
| <a name="input_recover_files_ignore"></a>[recover\_files\_ignore](#input_recover_files_ignore) | string | false | | File and directory patterns to <br>ignore when recovering deleted files. |
|
||||||
| <a name="input_recover_files_separator"></a>[recover\_files\_separator](#input_recover_files_separator) | string | false | `"\n"` | Separator used to split the <br>`recover_files` input |
|
| <a name="input_recover_files_ignore_separator"></a>[recover\_files\_ignore\_separator](#input_recover_files_ignore_separator) | string | false | `"\n"` | Separator used to split the <br>`recover_files_ignore` input |
|
||||||
| <a name="input_separator"></a>[separator](#input_separator) | string | false | `" "` | Split character for output strings |
|
| <a name="input_recover_files_separator"></a>[recover\_files\_separator](#input_recover_files_separator) | string | false | `"\n"` | Separator used to split the <br>`recover_files` input |
|
||||||
| <a name="input_sha"></a>[sha](#input_sha) | string | false | | Specify a different commit SHA <br>used for comparing changes |
|
| <a name="input_separator"></a>[separator](#input_separator) | string | false | `" "` | Split character for output strings |
|
||||||
| <a name="input_since"></a>[since](#input_since) | string | false | | Get changed files for commits <br>whose timestamp is older than <br>the given time. |
|
| <a name="input_sha"></a>[sha](#input_sha) | string | false | | Specify a different commit SHA <br>used for comparing changes |
|
||||||
| <a name="input_since_last_remote_commit"></a>[since\_last\_remote\_commit](#input_since_last_remote_commit) | string | false | `"false"` | Use the last commit on <br>the remote branch as the <br>`base_sha`. Defaults to the last <br>non-merge commit on the target <br>branch for pull request events <br>and the previous remote commit <br>of the current branch for <br>push events. |
|
| <a name="input_since"></a>[since](#input_since) | string | false | | Get changed files for commits <br>whose timestamp is older than <br>the given time. |
|
||||||
| <a name="input_skip_initial_fetch"></a>[skip\_initial\_fetch](#input_skip_initial_fetch) | string | false | `"false"` | Skip the initial fetch to <br>improve performance for shallow repositories. <br>**NOTE**: This could lead to <br>errors with missing history and <br>the intended use is limited <br>to when you've fetched the <br>history necessary to perform the <br>diff. |
|
| <a name="input_since_last_remote_commit"></a>[since\_last\_remote\_commit](#input_since_last_remote_commit) | string | false | `"false"` | Use the last commit on <br>the remote branch as the <br>`base_sha`. Defaults to the last <br>non-merge commit on the target <br>branch for pull request events <br>and the previous remote commit <br>of the current branch for <br>push events. |
|
||||||
| <a name="input_token"></a>[token](#input_token) | string | false | `"${{ github.token }}"` | Github token used to fetch <br>changed files from Github's API. |
|
| <a name="input_skip_initial_fetch"></a>[skip\_initial\_fetch](#input_skip_initial_fetch) | string | false | `"false"` | Skip the initial fetch to <br>improve performance for shallow repositories. <br>**NOTE**: This could lead to <br>errors with missing history and <br>the intended use is limited <br>to when you've fetched the <br>history necessary to perform the <br>diff. |
|
||||||
| <a name="input_until"></a>[until](#input_until) | string | false | | Get changed files for commits <br>whose timestamp is earlier than <br>the given time. |
|
| <a name="input_token"></a>[token](#input_token) | string | false | `"${{ github.token }}"` | Github token used to fetch <br>changed files from Github's API. |
|
||||||
| <a name="input_write_output_files"></a>[write\_output\_files](#input_write_output_files) | string | false | `"false"` | Write outputs to the `output_dir` <br>defaults to `.github/outputs` folder. **NOTE:** <br>This creates a `.txt` file <br>by default and a `.json` <br>file if `json` is set <br>to `true`. |
|
| <a name="input_until"></a>[until](#input_until) | string | false | | Get changed files for commits <br>whose timestamp is earlier than <br>the given time. |
|
||||||
|
| <a name="input_write_output_files"></a>[write\_output\_files](#input_write_output_files) | string | false | `"false"` | Write outputs to the `output_dir` <br>defaults to `.github/outputs` folder. **NOTE:** <br>This creates a `.txt` file <br>by default and a `.json` <br>file if `json` is set <br>to `true`. |
|
||||||
|
|
||||||
<!-- AUTO-DOC-INPUT:END -->
|
<!-- AUTO-DOC-INPUT:END -->
|
||||||
|
|
||||||
|
|||||||
@@ -120,6 +120,10 @@ inputs:
|
|||||||
description: "Separator used to split the `dir_names_include_files` input"
|
description: "Separator used to split the `dir_names_include_files` input"
|
||||||
default: "\n"
|
default: "\n"
|
||||||
required: false
|
required: false
|
||||||
|
dir_names_deleted_files_include_only_deleted_dirs:
|
||||||
|
description: "Include only directories that have been deleted as opposed to directory names of files that have been deleted in the `deleted_files` output when `dir_names` is set to `true`."
|
||||||
|
required: false
|
||||||
|
default: "false"
|
||||||
json:
|
json:
|
||||||
description: "Output list of changed files in a JSON formatted string which can be used for matrix jobs. [Example](https://github.com/tj-actions/changed-files/blob/main/.github/workflows/matrix-test.yml)"
|
description: "Output list of changed files in a JSON formatted string which can be used for matrix jobs. [Example](https://github.com/tj-actions/changed-files/blob/main/.github/workflows/matrix-test.yml)"
|
||||||
required: false
|
required: false
|
||||||
|
|||||||
53
dist/index.js
generated
vendored
53
dist/index.js
generated
vendored
@@ -57,7 +57,7 @@ const micromatch_1 = __importDefault(__nccwpck_require__(6228));
|
|||||||
const path = __importStar(__nccwpck_require__(1017));
|
const path = __importStar(__nccwpck_require__(1017));
|
||||||
const changedFilesOutput_1 = __nccwpck_require__(8930);
|
const changedFilesOutput_1 = __nccwpck_require__(8930);
|
||||||
const utils_1 = __nccwpck_require__(918);
|
const utils_1 = __nccwpck_require__(918);
|
||||||
const processChangedFiles = ({ filePatterns, allDiffFiles, inputs, yamlFilePatterns }) => __awaiter(void 0, void 0, void 0, function* () {
|
const processChangedFiles = ({ filePatterns, allDiffFiles, inputs, yamlFilePatterns, workingDirectory }) => __awaiter(void 0, void 0, void 0, function* () {
|
||||||
if (filePatterns.length > 0) {
|
if (filePatterns.length > 0) {
|
||||||
core.startGroup('changed-files-patterns');
|
core.startGroup('changed-files-patterns');
|
||||||
const allFilteredDiffFiles = yield (0, utils_1.getFilteredChangedFiles)({
|
const allFilteredDiffFiles = yield (0, utils_1.getFilteredChangedFiles)({
|
||||||
@@ -69,7 +69,8 @@ const processChangedFiles = ({ filePatterns, allDiffFiles, inputs, yamlFilePatte
|
|||||||
allDiffFiles,
|
allDiffFiles,
|
||||||
allFilteredDiffFiles,
|
allFilteredDiffFiles,
|
||||||
inputs,
|
inputs,
|
||||||
filePatterns
|
filePatterns,
|
||||||
|
workingDirectory
|
||||||
});
|
});
|
||||||
core.info('All Done!');
|
core.info('All Done!');
|
||||||
core.endGroup();
|
core.endGroup();
|
||||||
@@ -89,7 +90,8 @@ const processChangedFiles = ({ filePatterns, allDiffFiles, inputs, yamlFilePatte
|
|||||||
allFilteredDiffFiles,
|
allFilteredDiffFiles,
|
||||||
inputs,
|
inputs,
|
||||||
filePatterns: yamlFilePatterns[key],
|
filePatterns: yamlFilePatterns[key],
|
||||||
outputPrefix: key
|
outputPrefix: key,
|
||||||
|
workingDirectory
|
||||||
});
|
});
|
||||||
if (anyModified) {
|
if (anyModified) {
|
||||||
modifiedKeys.push(key);
|
modifiedKeys.push(key);
|
||||||
@@ -120,7 +122,8 @@ const processChangedFiles = ({ filePatterns, allDiffFiles, inputs, yamlFilePatte
|
|||||||
yield (0, changedFilesOutput_1.setOutputsAndGetModifiedAndChangedFilesStatus)({
|
yield (0, changedFilesOutput_1.setOutputsAndGetModifiedAndChangedFilesStatus)({
|
||||||
allDiffFiles,
|
allDiffFiles,
|
||||||
allFilteredDiffFiles: allDiffFiles,
|
allFilteredDiffFiles: allDiffFiles,
|
||||||
inputs
|
inputs,
|
||||||
|
workingDirectory
|
||||||
});
|
});
|
||||||
core.info('All Done!');
|
core.info('All Done!');
|
||||||
core.endGroup();
|
core.endGroup();
|
||||||
@@ -426,15 +429,19 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|||||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||||
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||||
|
};
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
exports.setOutputsAndGetModifiedAndChangedFilesStatus = void 0;
|
exports.setOutputsAndGetModifiedAndChangedFilesStatus = void 0;
|
||||||
const core = __importStar(__nccwpck_require__(2186));
|
const core = __importStar(__nccwpck_require__(2186));
|
||||||
|
const path_1 = __importDefault(__nccwpck_require__(1017));
|
||||||
const changedFiles_1 = __nccwpck_require__(7358);
|
const changedFiles_1 = __nccwpck_require__(7358);
|
||||||
const utils_1 = __nccwpck_require__(918);
|
const utils_1 = __nccwpck_require__(918);
|
||||||
const getArrayFromPaths = (paths, inputs) => {
|
const getArrayFromPaths = (paths, inputs) => {
|
||||||
return Array.isArray(paths) ? paths : paths.split(inputs.separator);
|
return Array.isArray(paths) ? paths : paths.split(inputs.separator);
|
||||||
};
|
};
|
||||||
const setOutputsAndGetModifiedAndChangedFilesStatus = ({ allDiffFiles, allFilteredDiffFiles, inputs, filePatterns = [], outputPrefix = '' }) => __awaiter(void 0, void 0, void 0, function* () {
|
const setOutputsAndGetModifiedAndChangedFilesStatus = ({ allDiffFiles, allFilteredDiffFiles, inputs, filePatterns = [], outputPrefix = '', workingDirectory }) => __awaiter(void 0, void 0, void 0, function* () {
|
||||||
const addedFiles = yield (0, changedFiles_1.getChangeTypeFiles)({
|
const addedFiles = yield (0, changedFiles_1.getChangeTypeFiles)({
|
||||||
inputs,
|
inputs,
|
||||||
changedFiles: allFilteredDiffFiles,
|
changedFiles: allFilteredDiffFiles,
|
||||||
@@ -737,6 +744,24 @@ const setOutputsAndGetModifiedAndChangedFilesStatus = ({ allDiffFiles, allFilter
|
|||||||
changeTypes: [changedFiles_1.ChangeTypeEnum.Deleted]
|
changeTypes: [changedFiles_1.ChangeTypeEnum.Deleted]
|
||||||
});
|
});
|
||||||
core.debug(`Deleted files: ${JSON.stringify(deletedFiles)}`);
|
core.debug(`Deleted files: ${JSON.stringify(deletedFiles)}`);
|
||||||
|
if (inputs.dirNamesDeletedFilesIncludeOnlyDeletedDirs &&
|
||||||
|
inputs.dirNames &&
|
||||||
|
workingDirectory) {
|
||||||
|
const newDeletedFilesPaths = [];
|
||||||
|
for (const deletedPath of getArrayFromPaths(deletedFiles.paths, inputs)) {
|
||||||
|
const dirPath = path_1.default.join(workingDirectory, deletedPath);
|
||||||
|
core.debug(`Checking if directory exists: ${dirPath}`);
|
||||||
|
if (!(yield (0, utils_1.exists)(dirPath))) {
|
||||||
|
core.debug(`Directory not found: ${dirPath}`);
|
||||||
|
newDeletedFilesPaths.push(deletedPath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
deletedFiles.paths = inputs.json
|
||||||
|
? newDeletedFilesPaths
|
||||||
|
: newDeletedFilesPaths.join(inputs.separator);
|
||||||
|
deletedFiles.count = newDeletedFilesPaths.length.toString();
|
||||||
|
core.debug(`New deleted files: ${JSON.stringify(deletedFiles)}`);
|
||||||
|
}
|
||||||
yield (0, utils_1.setOutput)({
|
yield (0, utils_1.setOutput)({
|
||||||
key: (0, utils_1.getOutputKey)('deleted_files', outputPrefix),
|
key: (0, utils_1.getOutputKey)('deleted_files', outputPrefix),
|
||||||
value: deletedFiles.paths,
|
value: deletedFiles.paths,
|
||||||
@@ -1261,6 +1286,8 @@ const getSHAForPullRequestEvent = (inputs, env, workingDirectory, isShallow, has
|
|||||||
sha2: currentSha,
|
sha2: currentSha,
|
||||||
diff
|
diff
|
||||||
}))) {
|
}))) {
|
||||||
|
core.warning('If this pull request is from a forked repository, please set the checkout action `repository` input to the same repository as the pull request.');
|
||||||
|
core.warning('This can be done by setting actions/checkout `repository` to ${{ github.event.pull_request.head.repo.full_name }}');
|
||||||
throw new Error(`Unable to determine a difference between ${previousSha}${diff}${currentSha}`);
|
throw new Error(`Unable to determine a difference between ${previousSha}${diff}${currentSha}`);
|
||||||
}
|
}
|
||||||
if (previousSha === currentSha) {
|
if (previousSha === currentSha) {
|
||||||
@@ -1491,6 +1518,9 @@ const getInputs = () => {
|
|||||||
const failOnSubmoduleDiffError = core.getBooleanInput('fail_on_submodule_diff_error', {
|
const failOnSubmoduleDiffError = core.getBooleanInput('fail_on_submodule_diff_error', {
|
||||||
required: false
|
required: false
|
||||||
});
|
});
|
||||||
|
const dirNamesDeletedFilesIncludeOnlyDeletedDirs = core.getBooleanInput('dir_names_deleted_files_include_only_deleted_dirs', {
|
||||||
|
required: false
|
||||||
|
});
|
||||||
const inputs = {
|
const inputs = {
|
||||||
files,
|
files,
|
||||||
filesSeparator,
|
filesSeparator,
|
||||||
@@ -1534,6 +1564,7 @@ const getInputs = () => {
|
|||||||
dirNamesExcludeCurrentDir,
|
dirNamesExcludeCurrentDir,
|
||||||
dirNamesIncludeFiles,
|
dirNamesIncludeFiles,
|
||||||
dirNamesIncludeFilesSeparator,
|
dirNamesIncludeFilesSeparator,
|
||||||
|
dirNamesDeletedFilesIncludeOnlyDeletedDirs,
|
||||||
json,
|
json,
|
||||||
escapeJson,
|
escapeJson,
|
||||||
writeOutputFiles,
|
writeOutputFiles,
|
||||||
@@ -1680,7 +1711,8 @@ const getChangedFilesFromLocalGitHistory = ({ inputs, env, workingDirectory, fil
|
|||||||
filePatterns,
|
filePatterns,
|
||||||
allDiffFiles,
|
allDiffFiles,
|
||||||
inputs,
|
inputs,
|
||||||
yamlFilePatterns
|
yamlFilePatterns,
|
||||||
|
workingDirectory
|
||||||
});
|
});
|
||||||
if (inputs.includeAllOldNewRenamedFiles) {
|
if (inputs.includeAllOldNewRenamedFiles) {
|
||||||
core.startGroup('changed-files-all-old-new-renamed-files');
|
core.startGroup('changed-files-all-old-new-renamed-files');
|
||||||
@@ -1863,7 +1895,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|||||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
exports.hasLocalGitDirectory = exports.recoverDeletedFiles = exports.setOutput = exports.setArrayOutput = exports.getOutputKey = exports.getRecoverFilePatterns = exports.getYamlFilePatterns = exports.getFilePatterns = exports.getDirNamesIncludeFilesPattern = exports.jsonOutput = exports.getDirnameMaxDepth = exports.canDiffCommits = exports.getPreviousGitTag = exports.verifyCommitSha = exports.getParentSha = exports.getRemoteBranchHeadSha = exports.isInsideWorkTree = exports.getHeadSha = exports.gitLog = exports.getFilteredChangedFiles = exports.getAllChangedFiles = exports.gitRenamedFiles = exports.gitSubmoduleDiffSHA = exports.getSubmodulePath = exports.gitFetchSubmodules = exports.gitFetch = exports.submoduleExists = exports.isRepoShallow = exports.updateGitGlobalConfig = exports.verifyMinimumGitVersion = exports.getDirname = exports.normalizeSeparators = exports.isWindows = void 0;
|
exports.hasLocalGitDirectory = exports.recoverDeletedFiles = exports.setOutput = exports.setArrayOutput = exports.getOutputKey = exports.getRecoverFilePatterns = exports.getYamlFilePatterns = exports.getFilePatterns = exports.getDirNamesIncludeFilesPattern = exports.jsonOutput = exports.getDirnameMaxDepth = exports.canDiffCommits = exports.getPreviousGitTag = exports.verifyCommitSha = exports.getParentSha = exports.getRemoteBranchHeadSha = exports.isInsideWorkTree = exports.getHeadSha = exports.gitLog = exports.getFilteredChangedFiles = exports.getAllChangedFiles = exports.gitRenamedFiles = exports.gitSubmoduleDiffSHA = exports.getSubmodulePath = exports.gitFetchSubmodules = exports.gitFetch = exports.submoduleExists = exports.isRepoShallow = exports.updateGitGlobalConfig = exports.exists = exports.verifyMinimumGitVersion = exports.getDirname = exports.normalizeSeparators = exports.isWindows = void 0;
|
||||||
/*global AsyncIterableIterator*/
|
/*global AsyncIterableIterator*/
|
||||||
const core = __importStar(__nccwpck_require__(2186));
|
const core = __importStar(__nccwpck_require__(2186));
|
||||||
const exec = __importStar(__nccwpck_require__(1514));
|
const exec = __importStar(__nccwpck_require__(1514));
|
||||||
@@ -1989,6 +2021,7 @@ const exists = (filePath) => __awaiter(void 0, void 0, void 0, function* () {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
exports.exists = exists;
|
||||||
/**
|
/**
|
||||||
* Generates lines of a file as an async iterable iterator
|
* Generates lines of a file as an async iterable iterator
|
||||||
* @param filePath - path of file to read
|
* @param filePath - path of file to read
|
||||||
@@ -2560,7 +2593,7 @@ const getYamlFilePatternsFromContents = ({ content = '', filePath = '', excluded
|
|||||||
const filePatterns = {};
|
const filePatterns = {};
|
||||||
let source = '';
|
let source = '';
|
||||||
if (filePath) {
|
if (filePath) {
|
||||||
if (!(yield exists(filePath))) {
|
if (!(yield (0, exports.exists)(filePath))) {
|
||||||
core.error(`File does not exist: ${filePath}`);
|
core.error(`File does not exist: ${filePath}`);
|
||||||
throw new Error(`File does not exist: ${filePath}`);
|
throw new Error(`File does not exist: ${filePath}`);
|
||||||
}
|
}
|
||||||
@@ -2712,7 +2745,7 @@ const setOutput = ({ key, value, writeOutputFiles, outputDir, json = false, shou
|
|||||||
if (writeOutputFiles) {
|
if (writeOutputFiles) {
|
||||||
const extension = json ? 'json' : 'txt';
|
const extension = json ? 'json' : 'txt';
|
||||||
const outputFilePath = path.join(outputDir, `${key}.${extension}`);
|
const outputFilePath = path.join(outputDir, `${key}.${extension}`);
|
||||||
if (!(yield exists(outputDir))) {
|
if (!(yield (0, exports.exists)(outputDir))) {
|
||||||
yield fs_1.promises.mkdir(outputDir, { recursive: true });
|
yield fs_1.promises.mkdir(outputDir, { recursive: true });
|
||||||
}
|
}
|
||||||
yield fs_1.promises.writeFile(outputFilePath, cleanedValue.replace(/\\"/g, '"'));
|
yield fs_1.promises.writeFile(outputFilePath, cleanedValue.replace(/\\"/g, '"'));
|
||||||
@@ -2751,7 +2784,7 @@ const recoverDeletedFiles = ({ inputs, workingDirectory, deletedFiles, recoverPa
|
|||||||
filePath: deletedFile,
|
filePath: deletedFile,
|
||||||
sha
|
sha
|
||||||
});
|
});
|
||||||
if (!(yield exists(path.dirname(target)))) {
|
if (!(yield (0, exports.exists)(path.dirname(target)))) {
|
||||||
yield fs_1.promises.mkdir(path.dirname(target), { recursive: true });
|
yield fs_1.promises.mkdir(path.dirname(target), { recursive: true });
|
||||||
}
|
}
|
||||||
yield fs_1.promises.writeFile(target, deletedFileContents);
|
yield fs_1.promises.writeFile(target, deletedFileContents);
|
||||||
|
|||||||
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
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@tj-actions/changed-files",
|
"name": "@tj-actions/changed-files",
|
||||||
"version": "39.1.0",
|
"version": "39.1.2",
|
||||||
"description": "Github action to retrieve all (added, copied, modified, deleted, renamed, type changed, unmerged, unknown) files and directories.",
|
"description": "Github action to retrieve all (added, copied, modified, deleted, renamed, type changed, unmerged, unknown) files and directories.",
|
||||||
"main": "lib/main.js",
|
"main": "lib/main.js",
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
|
|||||||
@@ -24,12 +24,14 @@ export const processChangedFiles = async ({
|
|||||||
filePatterns,
|
filePatterns,
|
||||||
allDiffFiles,
|
allDiffFiles,
|
||||||
inputs,
|
inputs,
|
||||||
yamlFilePatterns
|
yamlFilePatterns,
|
||||||
|
workingDirectory
|
||||||
}: {
|
}: {
|
||||||
filePatterns: string[]
|
filePatterns: string[]
|
||||||
allDiffFiles: ChangedFiles
|
allDiffFiles: ChangedFiles
|
||||||
inputs: Inputs
|
inputs: Inputs
|
||||||
yamlFilePatterns: Record<string, string[]>
|
yamlFilePatterns: Record<string, string[]>
|
||||||
|
workingDirectory?: string
|
||||||
}): Promise<void> => {
|
}): Promise<void> => {
|
||||||
if (filePatterns.length > 0) {
|
if (filePatterns.length > 0) {
|
||||||
core.startGroup('changed-files-patterns')
|
core.startGroup('changed-files-patterns')
|
||||||
@@ -44,7 +46,8 @@ export const processChangedFiles = async ({
|
|||||||
allDiffFiles,
|
allDiffFiles,
|
||||||
allFilteredDiffFiles,
|
allFilteredDiffFiles,
|
||||||
inputs,
|
inputs,
|
||||||
filePatterns
|
filePatterns,
|
||||||
|
workingDirectory
|
||||||
})
|
})
|
||||||
core.info('All Done!')
|
core.info('All Done!')
|
||||||
core.endGroup()
|
core.endGroup()
|
||||||
@@ -71,7 +74,8 @@ export const processChangedFiles = async ({
|
|||||||
allFilteredDiffFiles,
|
allFilteredDiffFiles,
|
||||||
inputs,
|
inputs,
|
||||||
filePatterns: yamlFilePatterns[key],
|
filePatterns: yamlFilePatterns[key],
|
||||||
outputPrefix: key
|
outputPrefix: key,
|
||||||
|
workingDirectory
|
||||||
})
|
})
|
||||||
if (anyModified) {
|
if (anyModified) {
|
||||||
modifiedKeys.push(key)
|
modifiedKeys.push(key)
|
||||||
@@ -106,7 +110,8 @@ export const processChangedFiles = async ({
|
|||||||
await setOutputsAndGetModifiedAndChangedFilesStatus({
|
await setOutputsAndGetModifiedAndChangedFilesStatus({
|
||||||
allDiffFiles,
|
allDiffFiles,
|
||||||
allFilteredDiffFiles: allDiffFiles,
|
allFilteredDiffFiles: allDiffFiles,
|
||||||
inputs
|
inputs,
|
||||||
|
workingDirectory
|
||||||
})
|
})
|
||||||
core.info('All Done!')
|
core.info('All Done!')
|
||||||
core.endGroup()
|
core.endGroup()
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import * as core from '@actions/core'
|
import * as core from '@actions/core'
|
||||||
|
import path from 'path'
|
||||||
import {
|
import {
|
||||||
ChangedFiles,
|
ChangedFiles,
|
||||||
ChangeTypeEnum,
|
ChangeTypeEnum,
|
||||||
@@ -6,7 +7,7 @@ import {
|
|||||||
getChangeTypeFiles
|
getChangeTypeFiles
|
||||||
} from './changedFiles'
|
} from './changedFiles'
|
||||||
import {Inputs} from './inputs'
|
import {Inputs} from './inputs'
|
||||||
import {getOutputKey, setArrayOutput, setOutput} from './utils'
|
import {getOutputKey, setArrayOutput, setOutput, exists} from './utils'
|
||||||
|
|
||||||
const getArrayFromPaths = (
|
const getArrayFromPaths = (
|
||||||
paths: string | string[],
|
paths: string | string[],
|
||||||
@@ -20,13 +21,15 @@ export const setOutputsAndGetModifiedAndChangedFilesStatus = async ({
|
|||||||
allFilteredDiffFiles,
|
allFilteredDiffFiles,
|
||||||
inputs,
|
inputs,
|
||||||
filePatterns = [],
|
filePatterns = [],
|
||||||
outputPrefix = ''
|
outputPrefix = '',
|
||||||
|
workingDirectory
|
||||||
}: {
|
}: {
|
||||||
allDiffFiles: ChangedFiles
|
allDiffFiles: ChangedFiles
|
||||||
allFilteredDiffFiles: ChangedFiles
|
allFilteredDiffFiles: ChangedFiles
|
||||||
inputs: Inputs
|
inputs: Inputs
|
||||||
filePatterns?: string[]
|
filePatterns?: string[]
|
||||||
outputPrefix?: string
|
outputPrefix?: string
|
||||||
|
workingDirectory?: string
|
||||||
}): Promise<{anyModified: boolean; anyChanged: boolean}> => {
|
}): Promise<{anyModified: boolean; anyChanged: boolean}> => {
|
||||||
const addedFiles = await getChangeTypeFiles({
|
const addedFiles = await getChangeTypeFiles({
|
||||||
inputs,
|
inputs,
|
||||||
@@ -388,6 +391,28 @@ export const setOutputsAndGetModifiedAndChangedFilesStatus = async ({
|
|||||||
changeTypes: [ChangeTypeEnum.Deleted]
|
changeTypes: [ChangeTypeEnum.Deleted]
|
||||||
})
|
})
|
||||||
core.debug(`Deleted files: ${JSON.stringify(deletedFiles)}`)
|
core.debug(`Deleted files: ${JSON.stringify(deletedFiles)}`)
|
||||||
|
|
||||||
|
if (
|
||||||
|
inputs.dirNamesDeletedFilesIncludeOnlyDeletedDirs &&
|
||||||
|
inputs.dirNames &&
|
||||||
|
workingDirectory
|
||||||
|
) {
|
||||||
|
const newDeletedFilesPaths: string[] = []
|
||||||
|
for (const deletedPath of getArrayFromPaths(deletedFiles.paths, inputs)) {
|
||||||
|
const dirPath = path.join(workingDirectory, deletedPath)
|
||||||
|
core.debug(`Checking if directory exists: ${dirPath}`)
|
||||||
|
if (!(await exists(dirPath))) {
|
||||||
|
core.debug(`Directory not found: ${dirPath}`)
|
||||||
|
newDeletedFilesPaths.push(deletedPath)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
deletedFiles.paths = inputs.json
|
||||||
|
? newDeletedFilesPaths
|
||||||
|
: newDeletedFilesPaths.join(inputs.separator)
|
||||||
|
deletedFiles.count = newDeletedFilesPaths.length.toString()
|
||||||
|
core.debug(`New deleted files: ${JSON.stringify(deletedFiles)}`)
|
||||||
|
}
|
||||||
|
|
||||||
await setOutput({
|
await setOutput({
|
||||||
key: getOutputKey('deleted_files', outputPrefix),
|
key: getOutputKey('deleted_files', outputPrefix),
|
||||||
value: deletedFiles.paths,
|
value: deletedFiles.paths,
|
||||||
|
|||||||
@@ -551,6 +551,12 @@ export const getSHAForPullRequestEvent = async (
|
|||||||
diff
|
diff
|
||||||
}))
|
}))
|
||||||
) {
|
) {
|
||||||
|
core.warning(
|
||||||
|
'If this pull request is from a forked repository, please set the checkout action `repository` input to the same repository as the pull request.'
|
||||||
|
)
|
||||||
|
core.warning(
|
||||||
|
'This can be done by setting actions/checkout `repository` to ${{ github.event.pull_request.head.repo.full_name }}'
|
||||||
|
)
|
||||||
throw new Error(
|
throw new Error(
|
||||||
`Unable to determine a difference between ${previousSha}${diff}${currentSha}`
|
`Unable to determine a difference between ${previousSha}${diff}${currentSha}`
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ export type Inputs = {
|
|||||||
dirNamesExcludeCurrentDir: boolean
|
dirNamesExcludeCurrentDir: boolean
|
||||||
dirNamesIncludeFiles: string
|
dirNamesIncludeFiles: string
|
||||||
dirNamesIncludeFilesSeparator: string
|
dirNamesIncludeFilesSeparator: string
|
||||||
|
dirNamesDeletedFilesIncludeOnlyDeletedDirs: boolean
|
||||||
json: boolean
|
json: boolean
|
||||||
escapeJson: boolean
|
escapeJson: boolean
|
||||||
fetchDepth?: number
|
fetchDepth?: number
|
||||||
@@ -210,6 +211,12 @@ export const getInputs = (): Inputs => {
|
|||||||
required: false
|
required: false
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
const dirNamesDeletedFilesIncludeOnlyDeletedDirs = core.getBooleanInput(
|
||||||
|
'dir_names_deleted_files_include_only_deleted_dirs',
|
||||||
|
{
|
||||||
|
required: false
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
const inputs: Inputs = {
|
const inputs: Inputs = {
|
||||||
files,
|
files,
|
||||||
@@ -254,6 +261,7 @@ export const getInputs = (): Inputs => {
|
|||||||
dirNamesExcludeCurrentDir,
|
dirNamesExcludeCurrentDir,
|
||||||
dirNamesIncludeFiles,
|
dirNamesIncludeFiles,
|
||||||
dirNamesIncludeFilesSeparator,
|
dirNamesIncludeFilesSeparator,
|
||||||
|
dirNamesDeletedFilesIncludeOnlyDeletedDirs,
|
||||||
json,
|
json,
|
||||||
escapeJson,
|
escapeJson,
|
||||||
writeOutputFiles,
|
writeOutputFiles,
|
||||||
|
|||||||
@@ -152,7 +152,8 @@ const getChangedFilesFromLocalGitHistory = async ({
|
|||||||
filePatterns,
|
filePatterns,
|
||||||
allDiffFiles,
|
allDiffFiles,
|
||||||
inputs,
|
inputs,
|
||||||
yamlFilePatterns
|
yamlFilePatterns,
|
||||||
|
workingDirectory
|
||||||
})
|
})
|
||||||
|
|
||||||
if (inputs.includeAllOldNewRenamedFiles) {
|
if (inputs.includeAllOldNewRenamedFiles) {
|
||||||
|
|||||||
@@ -139,7 +139,7 @@ export const verifyMinimumGitVersion = async (): Promise<void> => {
|
|||||||
* @param filePath - path to check
|
* @param filePath - path to check
|
||||||
* @returns path exists
|
* @returns path exists
|
||||||
*/
|
*/
|
||||||
const exists = async (filePath: string): Promise<boolean> => {
|
export const exists = async (filePath: string): Promise<boolean> => {
|
||||||
try {
|
try {
|
||||||
await fs.access(filePath)
|
await fs.access(filePath)
|
||||||
return true
|
return true
|
||||||
|
|||||||
@@ -972,9 +972,9 @@
|
|||||||
"@types/braces" "*"
|
"@types/braces" "*"
|
||||||
|
|
||||||
"@types/node@*", "@types/node@^20.3.2":
|
"@types/node@*", "@types/node@^20.3.2":
|
||||||
version "20.6.2"
|
version "20.6.3"
|
||||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.6.2.tgz#a065925409f59657022e9063275cd0b9bd7e1b12"
|
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.6.3.tgz#5b763b321cd3b80f6b8dde7a37e1a77ff9358dd9"
|
||||||
integrity sha512-Y+/1vGBHV/cYk6OI1Na/LHzwnlNCAfU3ZNGrc1LdRe/LAIbdDPTTv/HU3M7yXN448aTVDq3eKRm2cg7iKLb8gw==
|
integrity sha512-HksnYH4Ljr4VQgEy2lTStbCKv/P590tmPe5HqOnv9Gprffgv5WXAY+Y5Gqniu0GGqeTCUdBnzC3QSrzPkBkAMA==
|
||||||
|
|
||||||
"@types/semver@^7.3.12", "@types/semver@^7.5.0":
|
"@types/semver@^7.3.12", "@types/semver@^7.5.0":
|
||||||
version "7.5.2"
|
version "7.5.2"
|
||||||
|
|||||||
Reference in New Issue
Block a user