Compare commits
111 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
39283171ce | ||
|
|
33288d37e7 | ||
|
|
b60277dde9 | ||
|
|
68b429ddc6 | ||
|
|
ec0b6d0e4c | ||
|
|
e3ea6b7948 | ||
|
|
8c8be234b2 | ||
|
|
029d6cd6b8 | ||
|
|
8fc95ea175 | ||
|
|
3e2a2ce2d0 | ||
|
|
4aebdafc0b | ||
|
|
2aadab2297 | ||
|
|
2a968ff601 | ||
|
|
ef327f98b5 | ||
|
|
5c1cab8429 | ||
|
|
60e7ac7c28 | ||
|
|
fe91ab72f6 | ||
|
|
cc23ede837 | ||
|
|
76dc7bcd3f | ||
|
|
c7072f0969 | ||
|
|
032079bf7f | ||
|
|
21ccb43669 | ||
|
|
038a51af80 | ||
|
|
a5f4b54b5f | ||
|
|
61e9ed7dab | ||
|
|
c6c396f2fe | ||
|
|
7f05b89187 | ||
|
|
139cb86a77 | ||
|
|
97365f6cd2 | ||
|
|
1f20fb83f0 | ||
|
|
51647add79 | ||
|
|
6c6532459a | ||
|
|
f53b75ef58 | ||
|
|
732c1a14e7 | ||
|
|
3ab0d43f2c | ||
|
|
de17e6cdf2 | ||
|
|
c7bb50a40c | ||
|
|
fe12e8f13f | ||
|
|
87e23c4c79 | ||
|
|
2f49eb9ee1 | ||
|
|
00b3d3d9e7 | ||
|
|
19193bdb26 | ||
|
|
d12b5fc2ab | ||
|
|
338f354106 | ||
|
|
626a6b7213 | ||
|
|
090f90127a | ||
|
|
598640f3be | ||
|
|
7ee3290f25 | ||
|
|
e9eccdd473 | ||
|
|
6dc8c796c9 | ||
|
|
d1028b2eb8 | ||
|
|
0e24cebad0 | ||
|
|
d8f8ad9a74 | ||
|
|
47a703e935 | ||
|
|
742b6417b4 | ||
|
|
af9376f801 | ||
|
|
adaff22ded | ||
|
|
2cd4de3431 | ||
|
|
b199521773 | ||
|
|
aecc5ebeee | ||
|
|
630aa37bbd | ||
|
|
c060576a37 | ||
|
|
54849deb96 | ||
|
|
034e423c9c | ||
|
|
89c31817b2 | ||
|
|
e42f43b67b | ||
|
|
6fdb8b53b3 | ||
|
|
3323f78bb4 | ||
|
|
fe20777b56 | ||
|
|
89890d6f77 | ||
|
|
927a8c5ba3 | ||
|
|
5e7542fc4b | ||
|
|
bb3376162b | ||
|
|
6d350523ea | ||
|
|
8838901b21 | ||
|
|
eb59803836 | ||
|
|
bdf73bf6ae | ||
|
|
4cddd28d4b | ||
|
|
89f014aed9 | ||
|
|
4904bb2843 | ||
|
|
13e016d7c4 | ||
|
|
709c71af5f | ||
|
|
8c58d60f5b | ||
|
|
e6e128a1c4 | ||
|
|
358ff4f347 | ||
|
|
ec1e14cf27 | ||
|
|
7d7c69556b | ||
|
|
cb82bb7325 | ||
|
|
07e161e47f | ||
|
|
2106eb4457 | ||
|
|
4afe0ab671 | ||
|
|
5768dd7d22 | ||
|
|
648f9c1aaf | ||
|
|
e5efec47f6 | ||
|
|
d6d7cb291e | ||
|
|
5817a9efb0 | ||
|
|
33d50af03f | ||
|
|
a4cd522ee2 | ||
|
|
a553a029f5 | ||
|
|
faa5db4b1d | ||
|
|
63f203d400 | ||
|
|
fd5b3a411d | ||
|
|
c4a394a9cf | ||
|
|
50ae49b0e4 | ||
|
|
588d46e858 | ||
|
|
bdeaa9108c | ||
|
|
4d8812d205 | ||
|
|
668fd3a713 | ||
|
|
b952f3beb3 | ||
|
|
ce8bc5d49a | ||
|
|
9ff3603359 |
@@ -1,7 +1,8 @@
|
||||
{
|
||||
"plugins": [
|
||||
"jest",
|
||||
"@typescript-eslint"
|
||||
"@typescript-eslint",
|
||||
"github"
|
||||
],
|
||||
"extends": [
|
||||
"plugin:github/recommended"
|
||||
|
||||
10
.github/dependabot.yml
vendored
10
.github/dependabot.yml
vendored
@@ -1,7 +1,17 @@
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: npm
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
versioning-strategy: widen
|
||||
labels:
|
||||
- "merge when passing"
|
||||
- package-ecosystem: github-actions
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
labels:
|
||||
- "merge when passing"
|
||||
|
||||
26
.github/workflows/auto-merge.yml
vendored
26
.github/workflows/auto-merge.yml
vendored
@@ -1,26 +0,0 @@
|
||||
name: automerge
|
||||
on:
|
||||
check_suite:
|
||||
types:
|
||||
- completed
|
||||
|
||||
jobs:
|
||||
automerge:
|
||||
runs-on: ubuntu-latest
|
||||
if: |
|
||||
github.actor == 'dependabot[bot]' ||
|
||||
github.actor == 'dependabot' ||
|
||||
github.actor == 'dependabot-preview[bot]' ||
|
||||
github.actor == 'dependabot-preview' ||
|
||||
github.actor == 'renovate[bot]' ||
|
||||
github.actor == 'renovate'
|
||||
steps:
|
||||
- name: automerge
|
||||
uses: pascalgn/automerge-action@v0.15.6
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
|
||||
MERGE_METHOD: "rebase"
|
||||
UPDATE_METHOD: "rebase"
|
||||
MERGE_RETRIES: "6"
|
||||
MERGE_RETRY_SLEEP: "100000"
|
||||
MERGE_LABELS: ""
|
||||
2
.github/workflows/manual-test.yml
vendored
2
.github/workflows/manual-test.yml
vendored
@@ -12,7 +12,7 @@ jobs:
|
||||
fail-fast: false
|
||||
max-parallel: 7
|
||||
matrix:
|
||||
platform: [ubuntu-latest, ubuntu-22.04, windows-latest, macos-latest, macos-11, ubuntu-18.04, windows-2022]
|
||||
platform: [ubuntu-latest, windows-latest, macos-latest]
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
|
||||
4
.github/workflows/matrix-test.yml
vendored
4
.github/workflows/matrix-test.yml
vendored
@@ -26,7 +26,7 @@ jobs:
|
||||
- name: List all changed files
|
||||
run: echo '${{ steps.changed-files.outputs.all_changed_files }}'
|
||||
- id: set-matrix
|
||||
run: echo "matrix={\"container\":${{ steps.changed-files.outputs.all_changed_files }}}" >> "$GITHUB_OUTPUT"
|
||||
run: echo "matrix={\"files\":${{ steps.changed-files.outputs.all_changed_files }}}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
matrix-job:
|
||||
name: Run Matrix Job
|
||||
@@ -41,4 +41,4 @@ jobs:
|
||||
uses: actions/checkout@v3
|
||||
- name: Test
|
||||
run: |
|
||||
echo ${{ matrix.container }}
|
||||
echo ${{ matrix.files }}
|
||||
|
||||
62
.github/workflows/test.yml
vendored
62
.github/workflows/test.yml
vendored
@@ -51,7 +51,7 @@ jobs:
|
||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||
|
||||
- name: Use Node.js 16.x
|
||||
uses: actions/setup-node@v3.6.0
|
||||
uses: actions/setup-node@v3.7.0
|
||||
with:
|
||||
cache: 'yarn'
|
||||
node-version: '16.x'
|
||||
@@ -66,7 +66,7 @@ jobs:
|
||||
yarn install
|
||||
|
||||
- name: Run eslint on changed files
|
||||
uses: tj-actions/eslint-changed-files@v19
|
||||
uses: tj-actions/eslint-changed-files@v20
|
||||
if: github.event_name == 'pull_request'
|
||||
with:
|
||||
token: ${{ secrets.PAT_TOKEN }}
|
||||
@@ -78,7 +78,7 @@ jobs:
|
||||
yarn all
|
||||
|
||||
- name: Verify Changed files
|
||||
uses: tj-actions/verify-changed-files@v15
|
||||
uses: tj-actions/verify-changed-files@v16
|
||||
id: changed_files
|
||||
if: github.event_name == 'pull_request'
|
||||
with:
|
||||
@@ -132,6 +132,7 @@ jobs:
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: build-assets
|
||||
path: dir1/dist
|
||||
|
||||
- name: Run changed-files with defaults on the dir1
|
||||
id: changed-files-dir1
|
||||
@@ -153,6 +154,12 @@ jobs:
|
||||
shell:
|
||||
bash
|
||||
|
||||
- name: Download build assets
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: build-assets
|
||||
path: dir2/dist
|
||||
|
||||
- name: Checkout into dir2
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
@@ -314,8 +321,8 @@ jobs:
|
||||
fail-fast: false
|
||||
max-parallel: 4
|
||||
matrix:
|
||||
fetch-depth: [1, 2]
|
||||
input-fetch_depth: [1, 50]
|
||||
fetch-depth: [1, 2, 50]
|
||||
input-fetch_depth: [1, 2, 50]
|
||||
|
||||
steps:
|
||||
- name: Checkout branch
|
||||
@@ -332,8 +339,10 @@ jobs:
|
||||
- name: Run changed-files
|
||||
id: changed-files
|
||||
uses: ./
|
||||
continue-on-error: ${{ matrix.input-skip_initial_fetch == true && matrix.fetch-depth < 10 }}
|
||||
with:
|
||||
fetch_depth: ${{ matrix.input-fetch_depth }}
|
||||
skip_initial_fetch: ${{ github.event_name == 'push' }}
|
||||
|
||||
- name: Show output
|
||||
run: |
|
||||
@@ -508,6 +517,38 @@ jobs:
|
||||
echo "Expected: (failure) got ${{ steps.changed-files-specific.outcome }}"
|
||||
exit 1
|
||||
|
||||
test-rest-api:
|
||||
name: Test changed-files with REST API
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
if: github.event_name != 'push'
|
||||
permissions:
|
||||
pull-requests: read
|
||||
steps:
|
||||
- name: Checkout into dir1
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||
submodules: true
|
||||
fetch-depth: 0
|
||||
path: dir1
|
||||
|
||||
- name: Download build assets
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: build-assets
|
||||
path: dir1/dist
|
||||
|
||||
- name: Run changed-files with REST API
|
||||
id: changed-files
|
||||
uses: ./dir1
|
||||
|
||||
- name: Show output
|
||||
run: |
|
||||
echo '${{ toJSON(steps.changed-files.outputs) }}'
|
||||
shell:
|
||||
bash
|
||||
|
||||
test-submodules:
|
||||
name: Test changed-files with submodule
|
||||
runs-on: ubuntu-latest
|
||||
@@ -601,7 +642,7 @@ jobs:
|
||||
shell:
|
||||
bash
|
||||
|
||||
test_recover_deleted_file:
|
||||
test-recover-deleted-file:
|
||||
name: Test changed-files recover deleted file
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
@@ -631,6 +672,7 @@ jobs:
|
||||
base_sha: "fcdeb5b3d797752d95f6dbe98552a95c29dad338"
|
||||
sha: "432e0c810c60ef1332850a971c5ec39022034b4c"
|
||||
recover_deleted_files: true
|
||||
fetch_depth: 60000
|
||||
|
||||
- name: Show output
|
||||
run: |
|
||||
@@ -663,6 +705,7 @@ jobs:
|
||||
files: |
|
||||
test
|
||||
recover_deleted_files: true
|
||||
fetch_depth: 60000
|
||||
|
||||
- name: Show output
|
||||
run: |
|
||||
@@ -697,6 +740,7 @@ jobs:
|
||||
- test/**.txt
|
||||
- test/**.md
|
||||
recover_deleted_files: true
|
||||
fetch_depth: 60000
|
||||
|
||||
- name: Show output
|
||||
run: |
|
||||
@@ -728,6 +772,7 @@ jobs:
|
||||
sha: "432e0c810c60ef1332850a971c5ec39022034b4c"
|
||||
recover_deleted_files: true
|
||||
recover_deleted_files_to_destination: "deleted_files"
|
||||
fetch_depth: 60000
|
||||
|
||||
- name: Show output
|
||||
run: |
|
||||
@@ -869,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) }}'
|
||||
@@ -881,7 +927,7 @@ jobs:
|
||||
exit 1
|
||||
shell:
|
||||
bash
|
||||
- name: Run changed-files with dir_names and dir_names_exclude_root
|
||||
- name: Run changed-files with dir_names and dir_names_exclude_current_dir
|
||||
id: changed-files-dir-names-exclude-root
|
||||
uses: ./
|
||||
with:
|
||||
@@ -889,7 +935,7 @@ jobs:
|
||||
sha: ce8c1983
|
||||
fetch_depth: 60000
|
||||
dir_names: "true"
|
||||
dir_names_exclude_root: "true"
|
||||
dir_names_exclude_current_dir: "true"
|
||||
dir_names_max_depth: "1"
|
||||
- name: Show output
|
||||
run: |
|
||||
|
||||
2
.github/workflows/update-readme.yml
vendored
2
.github/workflows/update-readme.yml
vendored
@@ -20,7 +20,7 @@ jobs:
|
||||
uses: tj-actions/remark@v3
|
||||
|
||||
- name: Verify Changed files
|
||||
uses: tj-actions/verify-changed-files@v15
|
||||
uses: tj-actions/verify-changed-files@v16
|
||||
id: verify_changed_files
|
||||
with:
|
||||
files: |
|
||||
|
||||
298
HISTORY.md
298
HISTORY.md
@@ -1,5 +1,303 @@
|
||||
# Changelog
|
||||
|
||||
# [37.2.0](https://github.com/tj-actions/changed-files/compare/v37.1.2...v37.2.0) - (2023-07-18)
|
||||
|
||||
## <!-- 26 -->🔄 Update
|
||||
|
||||
- Update README.md ([e3ea6b7](https://github.com/tj-actions/changed-files/commit/e3ea6b7948826820cfd616fda2d9c974a4ead314)) - (Tonye Jack)
|
||||
|
||||
## <!-- 7 -->⚙️ Miscellaneous Tasks
|
||||
|
||||
- **deps:** Update dependency eslint-plugin-github to v4.9.2 ([#1388](https://github.com/tj-actions/changed-files/issues/1388)) ([68b429d](https://github.com/tj-actions/changed-files/commit/68b429ddc666ea0dba46309e1ee45e06bb408df8)) - (renovate[bot])
|
||||
- Switch to use the github context ([#1386](https://github.com/tj-actions/changed-files/issues/1386)) ([ec0b6d0](https://github.com/tj-actions/changed-files/commit/ec0b6d0e4c2965e4073849cbd0ab0e6fd3b42d50)) - (Tonye Jack)
|
||||
- **deps:** Update dependency eslint-plugin-github to v4.9.1 ([#1387](https://github.com/tj-actions/changed-files/issues/1387)) ([8c8be23](https://github.com/tj-actions/changed-files/commit/8c8be234b2ced36de48c003dd2b2b0cd3448985f)) - (renovate[bot])
|
||||
- **deps:** Update typescript-eslint monorepo to v6.1.0 ([#1385](https://github.com/tj-actions/changed-files/issues/1385)) ([029d6cd](https://github.com/tj-actions/changed-files/commit/029d6cd6b8191709b7e3d2bff0207a58a0c9c272)) - (renovate[bot])
|
||||
- **deps:** Lock file maintenance ([#1383](https://github.com/tj-actions/changed-files/issues/1383)) ([8fc95ea](https://github.com/tj-actions/changed-files/commit/8fc95ea17520d70ecf9d3141ec0a0d8443780a48)) - (renovate[bot])
|
||||
- **deps:** Lock file maintenance ([#1382](https://github.com/tj-actions/changed-files/issues/1382)) ([3e2a2ce](https://github.com/tj-actions/changed-files/commit/3e2a2ce2d08798ebef6a1b3b7fd8782820484ea4)) - (renovate[bot])
|
||||
- **deps:** Update dependency eslint to v8.45.0 ([#1381](https://github.com/tj-actions/changed-files/issues/1381)) ([4aebdaf](https://github.com/tj-actions/changed-files/commit/4aebdafc0bbe1a3beffb6e7f6278d3323c6aabcb)) - (renovate[bot])
|
||||
|
||||
## <!-- 9 -->⬆️ Upgrades
|
||||
|
||||
- Upgraded to v37.1.2 ([#1378](https://github.com/tj-actions/changed-files/issues/1378))
|
||||
|
||||
Co-authored-by: jackton1 <jackton1@users.noreply.github.com> ([2aadab2](https://github.com/tj-actions/changed-files/commit/2aadab2297933ef2a8eaa3a3316ae458aafe4964)) - (tj-actions[bot])
|
||||
|
||||
# [37.1.2](https://github.com/tj-actions/changed-files/compare/v37.1.1...v37.1.2) - (2023-07-13)
|
||||
|
||||
## <!-- 1 -->🐛 Bug Fixes
|
||||
|
||||
- Excluding current dir with max depth less than 2 ([#1375](https://github.com/tj-actions/changed-files/issues/1375)) ([2a968ff](https://github.com/tj-actions/changed-files/commit/2a968ff601949c81b47d9c1fdb789b0d25ddeea2)) - (Tonye Jack)
|
||||
|
||||
## <!-- 26 -->🔄 Update
|
||||
|
||||
- Updated README.md ([#1373](https://github.com/tj-actions/changed-files/issues/1373))
|
||||
|
||||
Co-authored-by: jackton1 <jackton1@users.noreply.github.com> ([fe91ab7](https://github.com/tj-actions/changed-files/commit/fe91ab72f6a9ecb02a0242c01b58685d5680fd4e)) - (tj-actions[bot])
|
||||
- Update README.md ([cc23ede](https://github.com/tj-actions/changed-files/commit/cc23ede8379d7798f2cd63082882472ae1add438)) - (Tonye Jack)
|
||||
- Updated README.md ([#1368](https://github.com/tj-actions/changed-files/issues/1368))
|
||||
|
||||
Co-authored-by: jackton1 <jackton1@users.noreply.github.com> ([032079b](https://github.com/tj-actions/changed-files/commit/032079bf7feccea4cc0b271962986e7770e345b3)) - (tj-actions[bot])
|
||||
- Update action.yml ([21ccb43](https://github.com/tj-actions/changed-files/commit/21ccb43669e77a07efac5f011bd4ee8b73128ef6)) - (Tonye Jack)
|
||||
- Updated README.md ([#1367](https://github.com/tj-actions/changed-files/issues/1367))
|
||||
|
||||
Co-authored-by: jackton1 <jackton1@users.noreply.github.com> ([038a51a](https://github.com/tj-actions/changed-files/commit/038a51af80a6a09ec582702adc3df051791f9db0)) - (tj-actions[bot])
|
||||
- Update README.md ([c6c396f](https://github.com/tj-actions/changed-files/commit/c6c396f2fe271cc83e7e0f9d536c3d86ec4c26ba)) - (Tonye Jack)
|
||||
- Update README.md ([7f05b89](https://github.com/tj-actions/changed-files/commit/7f05b891876669d2c7c19a0d297f6a3b856e0a74)) - (Tonye Jack)
|
||||
- Update README.md ([97365f6](https://github.com/tj-actions/changed-files/commit/97365f6cd24ea353a8eb76ec7882677c79f73b7e)) - (Tonye Jack)
|
||||
|
||||
## <!-- 7 -->⚙️ Miscellaneous Tasks
|
||||
|
||||
- **deps:** Update dependency eslint-plugin-github to v4.9.0 ([#1377](https://github.com/tj-actions/changed-files/issues/1377)) ([ef327f9](https://github.com/tj-actions/changed-files/commit/ef327f98b5f31e95aad0ae00e29a83a72294910a)) - (renovate[bot])
|
||||
- **deps:** Update dependency eslint-plugin-jest to v27.2.3 ([#1376](https://github.com/tj-actions/changed-files/issues/1376)) ([5c1cab8](https://github.com/tj-actions/changed-files/commit/5c1cab842919e3c5e2c9385b01039715b7f81382)) - (renovate[bot])
|
||||
- **deps:** Update dependency @types/node to v20.4.2 ([#1372](https://github.com/tj-actions/changed-files/issues/1372)) ([60e7ac7](https://github.com/tj-actions/changed-files/commit/60e7ac7c28a8e1f8d0dca3a5b0b2c558c38526d1)) - (renovate[bot])
|
||||
- Update README.md ([#1371](https://github.com/tj-actions/changed-files/issues/1371)) ([76dc7bc](https://github.com/tj-actions/changed-files/commit/76dc7bcd3f1236de1b72ce30d0b98b19cea5ab9d)) - (Tonye Jack)
|
||||
- Improve test coverage ([#1369](https://github.com/tj-actions/changed-files/issues/1369)) ([c7072f0](https://github.com/tj-actions/changed-files/commit/c7072f096921517be8c12059fdcdfaa3c27f8ee3)) - (Tonye Jack)
|
||||
- Update readme to include downsides of skipping the initial fetch ([a5f4b54](https://github.com/tj-actions/changed-files/commit/a5f4b54b5f4e834abbbe77a9f9f94af0b3d93ab0)) - (Tonye Jack)
|
||||
- **deps:** Update dependency eslint-plugin-prettier to v5.0.0 ([#1364](https://github.com/tj-actions/changed-files/issues/1364)) ([61e9ed7](https://github.com/tj-actions/changed-files/commit/61e9ed7dab363242491581aca47219f0201eb362)) - (renovate[bot])
|
||||
|
||||
## <!-- 9 -->⬆️ Upgrades
|
||||
|
||||
- Upgraded to v37.1.1 ([#1363](https://github.com/tj-actions/changed-files/issues/1363))
|
||||
|
||||
Co-authored-by: jackton1 <jackton1@users.noreply.github.com> ([139cb86](https://github.com/tj-actions/changed-files/commit/139cb86a771ba8b366563c29e123d7bd97ece0c2)) - (tj-actions[bot])
|
||||
|
||||
# [37.1.1](https://github.com/tj-actions/changed-files/compare/v37.1.0...v37.1.1) - (2023-07-11)
|
||||
|
||||
## <!-- 26 -->🔄 Update
|
||||
|
||||
- Updated README.md ([#1361](https://github.com/tj-actions/changed-files/issues/1361))
|
||||
|
||||
Co-authored-by: jackton1 <jackton1@users.noreply.github.com> ([f53b75e](https://github.com/tj-actions/changed-files/commit/f53b75ef587410b544b17c73677519d76ebe5775)) - (tj-actions[bot])
|
||||
- Update README.md ([732c1a1](https://github.com/tj-actions/changed-files/commit/732c1a14e7c752fc78b781de8975c102ad26dc5f)) - (Tonye Jack)
|
||||
- Update README.md ([de17e6c](https://github.com/tj-actions/changed-files/commit/de17e6cdf222c98c8d2caefef10216bbd23c557e)) - (Tonye Jack)
|
||||
|
||||
## <!-- 7 -->⚙️ Miscellaneous Tasks
|
||||
|
||||
- **deps:** Bump semver from 6.3.0 to 6.3.1 ([#1362](https://github.com/tj-actions/changed-files/issues/1362)) ([1f20fb8](https://github.com/tj-actions/changed-files/commit/1f20fb83f05eabed6e12ba0329edac8b6ec8e207)) - (dependabot[bot])
|
||||
- **deps:** Update typescript-eslint monorepo to v6 (major) ([#1360](https://github.com/tj-actions/changed-files/issues/1360)) ([51647ad](https://github.com/tj-actions/changed-files/commit/51647add79ed3e9ed311efd543bc342abc2db9e9)) - (renovate[bot])
|
||||
- **deps:** Update typescript-eslint monorepo to v5.62.0 ([#1359](https://github.com/tj-actions/changed-files/issues/1359)) ([6c65324](https://github.com/tj-actions/changed-files/commit/6c6532459ab0ab44938aabe62c8e665b5fd97aad)) - (renovate[bot])
|
||||
- **deps:** Update dependency @types/jest to v29.5.3 ([#1358](https://github.com/tj-actions/changed-files/issues/1358)) ([3ab0d43](https://github.com/tj-actions/changed-files/commit/3ab0d43f2c66ea0f1eb64b6f17ea2471c0f60711)) - (renovate[bot])
|
||||
- **deps:** Lock file maintenance ([#1356](https://github.com/tj-actions/changed-files/issues/1356)) ([c7bb50a](https://github.com/tj-actions/changed-files/commit/c7bb50a40c6695f3cf2a5e98f77abcd3b8c1775f)) - (renovate[bot])
|
||||
|
||||
## <!-- 9 -->⬆️ Upgrades
|
||||
|
||||
- Upgraded to v37.1.0 ([#1355](https://github.com/tj-actions/changed-files/issues/1355))
|
||||
|
||||
Co-authored-by: jackton1 <jackton1@users.noreply.github.com> ([fe12e8f](https://github.com/tj-actions/changed-files/commit/fe12e8f13fd61b4b3acc6a385f31a0c804b71f31)) - (tj-actions[bot])
|
||||
|
||||
# [37.1.0](https://github.com/tj-actions/changed-files/compare/v37.0.5...v37.1.0) - (2023-07-09)
|
||||
|
||||
## <!-- 0 -->🚀 Features
|
||||
|
||||
- Add support for skipping initial fetch ([#1353](https://github.com/tj-actions/changed-files/issues/1353)) ([2f49eb9](https://github.com/tj-actions/changed-files/commit/2f49eb9ee1f1dc38d9f070ebecf12b59c9436e0e)) - (Tonye Jack)
|
||||
|
||||
## <!-- 17 -->➖ Remove
|
||||
|
||||
- Deleted .github/workflows/auto-merge.yml ([d1028b2](https://github.com/tj-actions/changed-files/commit/d1028b2eb89e46a93cc618ef283598da9e43a860)) - (Tonye Jack)
|
||||
|
||||
## <!-- 26 -->🔄 Update
|
||||
|
||||
- Updated README.md ([#1354](https://github.com/tj-actions/changed-files/issues/1354))
|
||||
|
||||
Co-authored-by: repo-ranger[bot] <repo-ranger[bot]@users.noreply.github.com> ([87e23c4](https://github.com/tj-actions/changed-files/commit/87e23c4c79a603288642711155953c7da34b11ac)) - (tj-actions[bot])
|
||||
- Update README.md ([00b3d3d](https://github.com/tj-actions/changed-files/commit/00b3d3d9e7d0efa856785fc5586fefd61cbf9e92)) - (Tonye Jack)
|
||||
- Update README.md ([626a6b7](https://github.com/tj-actions/changed-files/commit/626a6b7213d3d54c32b7f8afae6251494453ded6)) - (Tonye Jack)
|
||||
- Update dependabot.yml ([7ee3290](https://github.com/tj-actions/changed-files/commit/7ee3290f25f5a3f42d74b3399dd2106a7f7ce2f3)) - (Tonye Jack)
|
||||
- Updated renovate.json ([e9eccdd](https://github.com/tj-actions/changed-files/commit/e9eccdd473f87222a6a8393f849d7c945568b842)) - (Tonye Jack)
|
||||
- Update dependabot.yml ([6dc8c79](https://github.com/tj-actions/changed-files/commit/6dc8c796c9b6810ee03d89669f5f7edf09069788)) - (Tonye Jack)
|
||||
|
||||
## <!-- 7 -->⚙️ Miscellaneous Tasks
|
||||
|
||||
- **deps-dev:** Bump prettier from 2.8.8 to 3.0.0 ([#1345](https://github.com/tj-actions/changed-files/issues/1345)) ([19193bd](https://github.com/tj-actions/changed-files/commit/19193bdb2634c8529d7b25642f3436f76eae0b45)) - (dependabot[bot])
|
||||
- **deps:** Update dependency @types/node to v20.4.1 ([#1351](https://github.com/tj-actions/changed-files/issues/1351)) ([d12b5fc](https://github.com/tj-actions/changed-files/commit/d12b5fc2ab2546513a4be53b41218c928fd70b99)) - (renovate[bot])
|
||||
- **deps:** Update dependency jest to v29.6.1 ([#1350](https://github.com/tj-actions/changed-files/issues/1350)) ([338f354](https://github.com/tj-actions/changed-files/commit/338f3541063a272dd7dcf8ed531daa483ca95762)) - (renovate[bot])
|
||||
- **deps:** Lock file maintenance ([#1349](https://github.com/tj-actions/changed-files/issues/1349)) ([090f901](https://github.com/tj-actions/changed-files/commit/090f90127a77657c1531f97f8f22a7ec1fbeeb1c)) - (renovate[bot])
|
||||
- **deps-dev:** Bump @types/node from 20.3.3 to 20.4.0 ([#1348](https://github.com/tj-actions/changed-files/issues/1348)) ([598640f](https://github.com/tj-actions/changed-files/commit/598640f3beb83bd8c85ef43b7df70d8fca22dca6)) - (dependabot[bot])
|
||||
- **deps:** Update actions/setup-node action to v3.7.0 ([#1344](https://github.com/tj-actions/changed-files/issues/1344)) ([0e24ceb](https://github.com/tj-actions/changed-files/commit/0e24cebad03e8080e8912d6a4a9a200b06ebd261)) - (renovate[bot])
|
||||
- **deps:** Lock file maintenance ([#1342](https://github.com/tj-actions/changed-files/issues/1342)) ([d8f8ad9](https://github.com/tj-actions/changed-files/commit/d8f8ad9a74cda2e39386f4cebf232f27f4099887)) - (renovate[bot])
|
||||
- **deps:** Update dependency jest to v29.6.0 ([#1341](https://github.com/tj-actions/changed-files/issues/1341)) ([47a703e](https://github.com/tj-actions/changed-files/commit/47a703e935c9dd0ecb0421d5656df3f8700d3a0c)) - (renovate[bot])
|
||||
- Update filter pattern ([#1340](https://github.com/tj-actions/changed-files/issues/1340)) ([742b641](https://github.com/tj-actions/changed-files/commit/742b6417b4068dac99221f71a1466631de290ebb)) - (Tonye Jack)
|
||||
- **deps:** Update typescript-eslint monorepo to v5.61.0 ([#1339](https://github.com/tj-actions/changed-files/issues/1339)) ([af9376f](https://github.com/tj-actions/changed-files/commit/af9376f80142244248805dc85f751b19e5875fbf)) - (renovate[bot])
|
||||
- **deps:** Lock file maintenance ([#1338](https://github.com/tj-actions/changed-files/issues/1338)) ([adaff22](https://github.com/tj-actions/changed-files/commit/adaff22dedce1452500712c7d1445f1ae776739a)) - (renovate[bot])
|
||||
- **deps:** Update dependency eslint to v8.44.0 ([#1337](https://github.com/tj-actions/changed-files/issues/1337)) ([2cd4de3](https://github.com/tj-actions/changed-files/commit/2cd4de3431b86792632cb629f30e5743924edb0a)) - (renovate[bot])
|
||||
- **deps:** Update dependency @types/node to v20.3.3 ([#1336](https://github.com/tj-actions/changed-files/issues/1336)) ([b199521](https://github.com/tj-actions/changed-files/commit/b1995217737c4c6b644dfee6b73e35063eff6591)) - (renovate[bot])
|
||||
- **deps:** Update dependency ts-jest to v29.1.1 ([#1333](https://github.com/tj-actions/changed-files/issues/1333)) ([aecc5eb](https://github.com/tj-actions/changed-files/commit/aecc5ebeee84c2358e83fc9101ef1a70bd0581ac)) - (renovate[bot])
|
||||
- **deps:** Lock file maintenance ([#1331](https://github.com/tj-actions/changed-files/issues/1331)) ([c060576](https://github.com/tj-actions/changed-files/commit/c060576a37b64111bff7727c21c1c91948fd88b2)) - (renovate[bot])
|
||||
|
||||
## <!-- 9 -->⬆️ Upgrades
|
||||
|
||||
- Upgraded to v37.0.5 ([#1332](https://github.com/tj-actions/changed-files/issues/1332))
|
||||
|
||||
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
|
||||
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com> ([630aa37](https://github.com/tj-actions/changed-files/commit/630aa37bbd533646936247a99e24e04efeb41602)) - (tj-actions[bot])
|
||||
|
||||
# [37.0.5](https://github.com/tj-actions/changed-files/compare/v37.0.4...v37.0.5) - (2023-06-29)
|
||||
|
||||
## <!-- 26 -->🔄 Update
|
||||
|
||||
- Update README.md ([034e423](https://github.com/tj-actions/changed-files/commit/034e423c9c8101a65e1da676ac29a3423ff442f7)) - (Tonye Jack)
|
||||
- Updated README.md ([#1329](https://github.com/tj-actions/changed-files/issues/1329))
|
||||
|
||||
Co-authored-by: jackton1 <jackton1@users.noreply.github.com> ([89c3181](https://github.com/tj-actions/changed-files/commit/89c31817b274e258fb873b539a68e467a4a385b0)) - (tj-actions[bot])
|
||||
- Update README.md ([e42f43b](https://github.com/tj-actions/changed-files/commit/e42f43b67b2ca0d726dec681aa34e4b875ddd284)) - (Tonye Jack)
|
||||
- Update README.md ([fe20777](https://github.com/tj-actions/changed-files/commit/fe20777b56dffa2faca8f02f32ba42ae644b5a7b)) - (Tonye Jack)
|
||||
- Update README.md ([89890d6](https://github.com/tj-actions/changed-files/commit/89890d6f77a064cdbf5c475517dca8d39228f154)) - (Tonye Jack)
|
||||
|
||||
## <!-- 7 -->⚙️ Miscellaneous Tasks
|
||||
|
||||
- **deps:** Lock file maintenance ([#1330](https://github.com/tj-actions/changed-files/issues/1330)) ([54849de](https://github.com/tj-actions/changed-files/commit/54849deb963ca9f24185fb5de2965e002d066e6b)) - (renovate[bot])
|
||||
- Update README.md ([6fdb8b5](https://github.com/tj-actions/changed-files/commit/6fdb8b53b33f2cf5a6a6969836ebfd774e05ff87)) - (Tonye Jack)
|
||||
- **deps:** Update dependency typescript to v5.1.6 ([#1328](https://github.com/tj-actions/changed-files/issues/1328)) ([3323f78](https://github.com/tj-actions/changed-files/commit/3323f78bb45033e3f3bb7d9cbc125d3f0833c243)) - (renovate[bot])
|
||||
- **deps:** Update dependency typescript to v5.1.5 ([#1324](https://github.com/tj-actions/changed-files/issues/1324)) ([927a8c5](https://github.com/tj-actions/changed-files/commit/927a8c5ba3f01280932398e5ce47d64bada31e32)) - (renovate[bot])
|
||||
|
||||
## <!-- 9 -->⬆️ Upgrades
|
||||
|
||||
- Upgraded to v37.0.4 ([#1323](https://github.com/tj-actions/changed-files/issues/1323))
|
||||
|
||||
Co-authored-by: jackton1 <jackton1@users.noreply.github.com> ([5e7542f](https://github.com/tj-actions/changed-files/commit/5e7542fc4bfffb67ec6f613fb57d17364b602f57)) - (tj-actions[bot])
|
||||
|
||||
# [37.0.4](https://github.com/tj-actions/changed-files/compare/v37.0.3...v37.0.4) - (2023-06-27)
|
||||
|
||||
## <!-- 1 -->🐛 Bug Fixes
|
||||
|
||||
- **deps:** Update dependency @octokit/rest to v19.0.13 ([#1318](https://github.com/tj-actions/changed-files/issues/1318)) ([eb59803](https://github.com/tj-actions/changed-files/commit/eb598038365111ee2d653fed71db39c68d8a5ca6)) - (renovate[bot])
|
||||
|
||||
## <!-- 26 -->🔄 Update
|
||||
|
||||
- Updated README.md ([#1314](https://github.com/tj-actions/changed-files/issues/1314))
|
||||
|
||||
Co-authored-by: jackton1 <jackton1@users.noreply.github.com> ([4904bb2](https://github.com/tj-actions/changed-files/commit/4904bb2843fce2a1cec977be83ccda6c1605ff9c)) - (tj-actions[bot])
|
||||
- Update README.md ([13e016d](https://github.com/tj-actions/changed-files/commit/13e016d7c459ba0b877df6680a5543e9f8890ef9)) - (Tonye Jack)
|
||||
- Updated submodule ([#1307](https://github.com/tj-actions/changed-files/issues/1307))
|
||||
|
||||
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
|
||||
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com> ([e6e128a](https://github.com/tj-actions/changed-files/commit/e6e128a1c4b816aabb14c127146e2371749458c0)) - (tj-actions[bot])
|
||||
|
||||
## <!-- 7 -->⚙️ Miscellaneous Tasks
|
||||
|
||||
- **deps:** Lock file maintenance ([#1320](https://github.com/tj-actions/changed-files/issues/1320)) ([bb33761](https://github.com/tj-actions/changed-files/commit/bb3376162b179308a79fc4450262a15a8e1d6888)) - (renovate[bot])
|
||||
- **deps:** Bump lodash from 4.17.15 to 4.17.21 ([#1322](https://github.com/tj-actions/changed-files/issues/1322)) ([6d35052](https://github.com/tj-actions/changed-files/commit/6d350523ea913b29cd86acff803c50fcbd829ffc)) - (dependabot[bot])
|
||||
- Update package.json ([8838901](https://github.com/tj-actions/changed-files/commit/8838901b21e20574f67a02954a585a5ba579809e)) - (Tonye Jack)
|
||||
- Update package version requirements ([#1317](https://github.com/tj-actions/changed-files/issues/1317)) ([bdf73bf](https://github.com/tj-actions/changed-files/commit/bdf73bf6aec3938ce64ef74eb6b86af0271804a2)) - (Tonye Jack)
|
||||
- **deps:** Update dependency @types/node to v20.3.2 ([#1315](https://github.com/tj-actions/changed-files/issues/1315)) ([4cddd28](https://github.com/tj-actions/changed-files/commit/4cddd28d4b8f3c05636331fdba69336f95c127a2)) - (renovate[bot])
|
||||
- Increase fetch-depth to resolve error with test ([#1316](https://github.com/tj-actions/changed-files/issues/1316)) ([89f014a](https://github.com/tj-actions/changed-files/commit/89f014aed90c84e49f2d9c972ad1b3b43f6e10d8)) - (Tonye Jack)
|
||||
- **deps:** Update typescript-eslint monorepo to v5.60.1 ([#1313](https://github.com/tj-actions/changed-files/issues/1313)) ([709c71a](https://github.com/tj-actions/changed-files/commit/709c71af5fefd98c04ccbfb9e588784850d867cd)) - (renovate[bot])
|
||||
- Update debug message ([#1311](https://github.com/tj-actions/changed-files/issues/1311)) ([8c58d60](https://github.com/tj-actions/changed-files/commit/8c58d60f5bd07539ff823a0ed6eb66262bd89c70)) - (Tonye Jack)
|
||||
|
||||
## <!-- 9 -->⬆️ Upgrades
|
||||
|
||||
- Upgraded to v37.0.3 ([#1310](https://github.com/tj-actions/changed-files/issues/1310))
|
||||
|
||||
Co-authored-by: jackton1 <jackton1@users.noreply.github.com> ([358ff4f](https://github.com/tj-actions/changed-files/commit/358ff4f347713d6c6eb579a95b43955158857ac1)) - (tj-actions[bot])
|
||||
|
||||
# [37.0.3](https://github.com/tj-actions/changed-files/compare/v37.0.2...v37.0.3) - (2023-06-26)
|
||||
|
||||
## <!-- 1 -->🐛 Bug Fixes
|
||||
|
||||
- Bug listing submodule paths ([#1308](https://github.com/tj-actions/changed-files/issues/1308)) ([7d7c695](https://github.com/tj-actions/changed-files/commit/7d7c69556b242d112e52d307ae14ba770a52af47)) - (Tonye Jack)
|
||||
|
||||
## <!-- 7 -->⚙️ Miscellaneous Tasks
|
||||
|
||||
- **deps:** Lock file maintenance ([#1309](https://github.com/tj-actions/changed-files/issues/1309)) ([ec1e14c](https://github.com/tj-actions/changed-files/commit/ec1e14cf27f4585783f463070881b2c499349a8a)) - (renovate[bot])
|
||||
- **deps:** Lock file maintenance ([#1306](https://github.com/tj-actions/changed-files/issues/1306)) ([cb82bb7](https://github.com/tj-actions/changed-files/commit/cb82bb73255fe3d708c0da15a592f93d820e3499)) - (renovate[bot])
|
||||
|
||||
## <!-- 9 -->⬆️ Upgrades
|
||||
|
||||
- Upgraded to v37.0.2 ([#1305](https://github.com/tj-actions/changed-files/issues/1305))
|
||||
|
||||
Co-authored-by: jackton1 <jackton1@users.noreply.github.com> ([07e161e](https://github.com/tj-actions/changed-files/commit/07e161e47fa182e1cc2cb37c80f4e3b175124385)) - (tj-actions[bot])
|
||||
|
||||
# [37.0.2](https://github.com/tj-actions/changed-files/compare/v37.0.1...v37.0.2) - (2023-06-25)
|
||||
|
||||
## <!-- 1 -->🐛 Bug Fixes
|
||||
|
||||
- Add warning message when unable to list submodules ([#1304](https://github.com/tj-actions/changed-files/issues/1304)) ([2106eb4](https://github.com/tj-actions/changed-files/commit/2106eb4457dd2aba4d37c8cdd16acba5d18739b9)) - (Tonye Jack)
|
||||
|
||||
## <!-- 7 -->⚙️ Miscellaneous Tasks
|
||||
|
||||
- **deps:** Update dependency @types/node to v20.3.1 ([#1303](https://github.com/tj-actions/changed-files/issues/1303)) ([4afe0ab](https://github.com/tj-actions/changed-files/commit/4afe0ab671c36efef1ae5e3e27d8286c3f797f03)) - (renovate[bot])
|
||||
- **deps:** Update tj-actions/eslint-changed-files action to v20 ([#1301](https://github.com/tj-actions/changed-files/issues/1301)) ([5768dd7](https://github.com/tj-actions/changed-files/commit/5768dd7d22ef79603ef768047c6d91ea034d0cdc)) - (renovate[bot])
|
||||
|
||||
## <!-- 9 -->⬆️ Upgrades
|
||||
|
||||
- Upgraded to v37.0.1 ([#1300](https://github.com/tj-actions/changed-files/issues/1300))
|
||||
|
||||
Co-authored-by: jackton1 <jackton1@users.noreply.github.com> ([648f9c1](https://github.com/tj-actions/changed-files/commit/648f9c1aaf717f92ac2b503be6694ef804b8a49e)) - (tj-actions[bot])
|
||||
|
||||
# [37.0.1](https://github.com/tj-actions/changed-files/compare/v37.0.0...v37.0.1) - (2023-06-24)
|
||||
|
||||
## <!-- 1 -->🐛 Bug Fixes
|
||||
|
||||
- Error using current path to determine the .git dir location ([#1299](https://github.com/tj-actions/changed-files/issues/1299)) ([e5efec4](https://github.com/tj-actions/changed-files/commit/e5efec47f620e0fde64a1ad8f53bbf53d51a8c97)) - (Tonye Jack)
|
||||
|
||||
## <!-- 9 -->⬆️ Upgrades
|
||||
|
||||
- Upgraded to v37 ([#1298](https://github.com/tj-actions/changed-files/issues/1298))
|
||||
|
||||
Co-authored-by: jackton1 <jackton1@users.noreply.github.com> ([d6d7cb2](https://github.com/tj-actions/changed-files/commit/d6d7cb291e28bba32464fbbf0d13c7f6c2c75de1)) - (tj-actions[bot])
|
||||
|
||||
# [37.0.0](https://github.com/tj-actions/changed-files/compare/v36.4.1...v37.0.0) - (2023-06-23)
|
||||
|
||||
## <!-- 0 -->🚀 Features
|
||||
|
||||
- Add support for retrieving changed files via github rest api ([#1289](https://github.com/tj-actions/changed-files/issues/1289)) ([fd5b3a4](https://github.com/tj-actions/changed-files/commit/fd5b3a411da53db8da7b4b197cc1b1066dcd5360)) - (Tonye Jack)
|
||||
|
||||
## <!-- 17 -->➖ Remove
|
||||
|
||||
- Deprecated dir_names_exclude_root ([#1291](https://github.com/tj-actions/changed-files/issues/1291)) ([faa5db4](https://github.com/tj-actions/changed-files/commit/faa5db4b1d5c904bd14ba8dc0d429e2c257c9638)) - (Tonye Jack)
|
||||
|
||||
## <!-- 26 -->🔄 Update
|
||||
|
||||
- Updated README.md ([#1295](https://github.com/tj-actions/changed-files/issues/1295))
|
||||
|
||||
Co-authored-by: jackton1 <jackton1@users.noreply.github.com> ([a553a02](https://github.com/tj-actions/changed-files/commit/a553a029f5a46a8e74f782b41db046e63aab0cfb)) - (tj-actions[bot])
|
||||
- Updated README.md ([#1292](https://github.com/tj-actions/changed-files/issues/1292))
|
||||
|
||||
Co-authored-by: repo-ranger[bot] <repo-ranger[bot]@users.noreply.github.com> ([63f203d](https://github.com/tj-actions/changed-files/commit/63f203d400de5479b07e8a01487881309f2bc0ce)) - (tj-actions[bot])
|
||||
|
||||
## <!-- 7 -->⚙️ Miscellaneous Tasks
|
||||
|
||||
- Update README.md ([5817a9e](https://github.com/tj-actions/changed-files/commit/5817a9efb0d7cc34b917d8146ea10b9f32044968)) - (Tonye Jack)
|
||||
- **deps:** Lock file maintenance ([#1297](https://github.com/tj-actions/changed-files/issues/1297)) ([33d50af](https://github.com/tj-actions/changed-files/commit/33d50af03f5e8e0914e7ddea9455ca6cde2033b1)) - (renovate[bot])
|
||||
- Use input api url ([#1293](https://github.com/tj-actions/changed-files/issues/1293)) ([a4cd522](https://github.com/tj-actions/changed-files/commit/a4cd522ee2e5d7999bb102867e6d806e59861c52)) - (Tonye Jack)
|
||||
- **deps:** Lock file maintenance ([#1290](https://github.com/tj-actions/changed-files/issues/1290)) ([c4a394a](https://github.com/tj-actions/changed-files/commit/c4a394a9cfbbfcea1d864b5d6c9f9aa2b7960a9b)) - (renovate[bot])
|
||||
- **deps:** Update tj-actions/verify-changed-files action to v16 ([#1288](https://github.com/tj-actions/changed-files/issues/1288)) ([50ae49b](https://github.com/tj-actions/changed-files/commit/50ae49b0e4dc2c5bdccb7aad26373561c753b17f)) - (renovate[bot])
|
||||
- Update manual-test.yml ([588d46e](https://github.com/tj-actions/changed-files/commit/588d46e858ff7c814f5a26458ae8794b715d690a)) - (Tonye Jack)
|
||||
- Update README.md ([bdeaa91](https://github.com/tj-actions/changed-files/commit/bdeaa9108ce22a3e92aefbe165c85ea29b839a24)) - (Tonye Jack)
|
||||
- Update matrix-test.yml ([4d8812d](https://github.com/tj-actions/changed-files/commit/4d8812d205c7d0bca52560321514947f65c7a2f9)) - (Tonye Jack)
|
||||
- **deps:** Lock file maintenance ([#1287](https://github.com/tj-actions/changed-files/issues/1287)) ([668fd3a](https://github.com/tj-actions/changed-files/commit/668fd3a7139e499b321f1889c2f1a90b508da43e)) - (renovate[bot])
|
||||
- **deps:** Lock file maintenance ([#1285](https://github.com/tj-actions/changed-files/issues/1285)) ([b952f3b](https://github.com/tj-actions/changed-files/commit/b952f3beb3bb65ec19163628da458efb10e5f3d6)) - (renovate[bot])
|
||||
- **deps:** Lock file maintenance ([#1284](https://github.com/tj-actions/changed-files/issues/1284)) ([ce8bc5d](https://github.com/tj-actions/changed-files/commit/ce8bc5d49a2cf03a217066239554d467140a3054)) - (renovate[bot])
|
||||
|
||||
## <!-- 9 -->⬆️ Upgrades
|
||||
|
||||
- Upgraded to v36.4.1 ([#1283](https://github.com/tj-actions/changed-files/issues/1283))
|
||||
|
||||
Co-authored-by: jackton1 <jackton1@users.noreply.github.com> ([9ff3603](https://github.com/tj-actions/changed-files/commit/9ff36033594327f40a8c22612579a3604e90fc7a)) - (tj-actions[bot])
|
||||
|
||||
# [36.4.1](https://github.com/tj-actions/changed-files/compare/v36.4.0...v36.4.1) - (2023-06-19)
|
||||
|
||||
## <!-- 1 -->🐛 Bug Fixes
|
||||
|
||||
- Bug with returning old filename in renamed files output ([#1281](https://github.com/tj-actions/changed-files/issues/1281)) ([54479c3](https://github.com/tj-actions/changed-files/commit/54479c37f5eb47a43e595c6b71e1df2c112ce7f1)) - (Tonye Jack)
|
||||
|
||||
## <!-- 26 -->🔄 Update
|
||||
|
||||
- Update action.yml ([18c62c5](https://github.com/tj-actions/changed-files/commit/18c62c592a1bb252205275ac68d523e142aa3256)) - (Tonye Jack)
|
||||
|
||||
## <!-- 7 -->⚙️ Miscellaneous Tasks
|
||||
|
||||
- **deps:** Update typescript-eslint monorepo to v5.60.0 ([#1282](https://github.com/tj-actions/changed-files/issues/1282)) ([6d89069](https://github.com/tj-actions/changed-files/commit/6d890691342f29ee654d14841dae8c5d46b23180)) - (renovate[bot])
|
||||
- **deps:** Update reviewdog/action-shellcheck action to v1.18 ([#1279](https://github.com/tj-actions/changed-files/issues/1279)) ([3bbaba4](https://github.com/tj-actions/changed-files/commit/3bbaba4ae79020f9eaff96b5cbecc0f0663214a1)) - (renovate[bot])
|
||||
- **deps:** Update dependency eslint-plugin-jest to v27.2.2 ([#1278](https://github.com/tj-actions/changed-files/issues/1278)) ([c39b06f](https://github.com/tj-actions/changed-files/commit/c39b06f825efcb60a604e5f952a513b644de6164)) - (renovate[bot])
|
||||
- **deps:** Lock file maintenance ([#1277](https://github.com/tj-actions/changed-files/issues/1277)) ([4c2f8ed](https://github.com/tj-actions/changed-files/commit/4c2f8eda370a246578045fa9ad100be4dd83fdc6)) - (renovate[bot])
|
||||
|
||||
## <!-- 9 -->⬆️ Upgrades
|
||||
|
||||
- Upgraded to v36.4.0 ([#1275](https://github.com/tj-actions/changed-files/issues/1275))
|
||||
|
||||
Co-authored-by: jackton1 <jackton1@users.noreply.github.com> ([2c8123e](https://github.com/tj-actions/changed-files/commit/2c8123e91ee0d1adea852dca2c0139cb15c3aabf)) - (tj-actions[bot])
|
||||
|
||||
# [36.4.0](https://github.com/tj-actions/changed-files/compare/v36.3.0...v36.4.0) - (2023-06-17)
|
||||
|
||||
## <!-- 0 -->🚀 Features
|
||||
|
||||
320
README.md
320
README.md
@@ -19,18 +19,22 @@
|
||||
|
||||
## changed-files
|
||||
|
||||
Effortlessly track all changed files and directories relative to a target branch, preceding commit or the last remote commit returning **relative paths** from the project root.
|
||||
Effortlessly track all changed files and directories relative to a target branch, preceding commit or the last remote commit returning **relative paths** from the project root using this GitHub action.
|
||||
|
||||
## Table of contents
|
||||
|
||||
* [Features](#features)
|
||||
* [Usage](#usage)
|
||||
* [On `pull_request`](#on-pull_request)
|
||||
* [Using local .git history](#using-local-git-history)
|
||||
* [Using Github's API](#using-githubs-api)
|
||||
* [On `push`](#on-push)
|
||||
* [Useful Acronyms](#useful-acronyms)
|
||||
* [Outputs](#outputs)
|
||||
* [Inputs](#inputs)
|
||||
* [Versioning](#versioning)
|
||||
* [Examples](#examples)
|
||||
* [Real world usage](#real-world-usage)
|
||||
* [Real-world usage](#real-world-usage)
|
||||
* [Known Limitation](#known-limitation)
|
||||
* [Migration guide](#migration-guide)
|
||||
* [Credits](#credits)
|
||||
@@ -39,13 +43,14 @@ Effortlessly track all changed files and directories relative to a target branch
|
||||
|
||||
## Features
|
||||
|
||||
* Provides fast execution, averaging 0-10 seconds.
|
||||
* Fast execution, averaging 0-10 seconds.
|
||||
* Leverages either [Github's REST API](https://docs.github.com/en/rest/reference/repos#list-commits) or [Git's native diff](https://git-scm.com/docs/git-diff) to determine changed files.
|
||||
* Facilitates easy debugging.
|
||||
* Scales to handle large repositories.
|
||||
* Supports Git submodules.
|
||||
* Generates escaped JSON output for running matrix jobs based on changed files.
|
||||
* Lists changed directories.
|
||||
* Allows limiting the matching changed directories to a specified maximum depth.
|
||||
* Limits matching changed directories to a specified maximum depth.
|
||||
* Optionally excludes the current directory.
|
||||
* Writes outputs to a designated `.txt` or `.json` file for further processing.
|
||||
* Restores deleted files to their previous location or a newly specified location.
|
||||
@@ -80,25 +85,24 @@ And many more.
|
||||
> * Ensure that `persist-credentials` is set to `true` when configuring [`actions/checkout`](https://github.com/actions/checkout#usage) if `fetch-depth` isn't set to `0`.
|
||||
> * For repositories that have PRs generated from forks when configuring [`actions/checkout`](https://github.com/actions/checkout#usage) set the `repository` 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)
|
||||
|
||||
### On `pull_request`
|
||||
|
||||
#### Using local .git history
|
||||
|
||||
```yaml
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
# ------------------------------------------------------------------------------------------------------------
|
||||
# Event `push`: Compare the preceding commit -> to the current commit of the main branch.
|
||||
# Event `pull_request`: Compare the last commit of main -> to the current commit of a Pull Request branch.
|
||||
# ------------------------------------------------------------------------------------------------------------
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest # windows-latest | macos-latest
|
||||
# ------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
# Event `pull_request`: Compare the last commit of the main branch or last remote commit of the PR branch -> to the current commit of a PR branch.
|
||||
# ------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
changed_files:
|
||||
runs-on: ubuntu-latest # windows-latest || macos-latest
|
||||
name: Test changed-files
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
@@ -108,7 +112,7 @@ jobs:
|
||||
# Example 1
|
||||
- name: Get changed files
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@v36
|
||||
uses: tj-actions/changed-files@v37
|
||||
|
||||
# To compare changes between the current commit and the last pushed remote commit set `since_last_remote_commit: true`. e.g
|
||||
# with:
|
||||
@@ -123,40 +127,25 @@ jobs:
|
||||
# Example 2
|
||||
- name: Get changed files in the docs folder
|
||||
id: changed-files-specific
|
||||
uses: tj-actions/changed-files@v36
|
||||
uses: tj-actions/changed-files@v37
|
||||
with:
|
||||
files: docs/*.{js,html} # Alternatively using: `docs/**` or `docs`
|
||||
files_ignore: docs/static.js
|
||||
|
||||
- name: Run step if any file(s) in the docs folder change
|
||||
if: steps.changed-files-specific.outputs.any_changed == 'true'
|
||||
run: |
|
||||
echo "One or more files in the docs folder has changed."
|
||||
echo "List all the files that have changed: ${{ steps.changed-files-specific.outputs.all_changed_files }}"
|
||||
|
||||
|
||||
# Example 3
|
||||
- name: Get all changed .js file(s) or any file in the static folder excluding the docs folder
|
||||
id: changed-files-excluded
|
||||
uses: tj-actions/changed-files@v36
|
||||
with:
|
||||
files: |
|
||||
**.js
|
||||
static
|
||||
files_ignore: docs
|
||||
|
||||
- name: Run step if any .js file(s) or any file in the static folder change
|
||||
if: steps.changed-files-excluded.outputs.any_changed == 'true'
|
||||
run: |
|
||||
echo "One or more .js file(s) or any file in the static folder but not in the doc folder has changed."
|
||||
echo "List all the files that have changed: ${{ steps.changed-files-excluded.outputs.all_changed_files }}"
|
||||
|
||||
# Example 4
|
||||
- name: Get all test, doc and src files that have changed
|
||||
id: changed-files-yml
|
||||
uses: tj-actions/changed-files@v36
|
||||
id: changed-files-yaml
|
||||
uses: tj-actions/changed-files@v37
|
||||
with:
|
||||
files_yaml: |
|
||||
doc:
|
||||
- *.md
|
||||
- **.md
|
||||
- docs/**
|
||||
- !docs/README.md
|
||||
test:
|
||||
@@ -167,16 +156,117 @@ jobs:
|
||||
# Optionally set `files_yaml_from_source_file` to read the YAML from a file. e.g `files_yaml_from_source_file: .github/changed-files.yml`
|
||||
|
||||
- name: Run step if test file(s) change
|
||||
if: steps.changed-files-yml.outputs.test_any_changed == 'true'
|
||||
if: steps.changed-files-yaml.outputs.test_any_changed == 'true'
|
||||
run: |
|
||||
echo "One or more test file(s) has changed."
|
||||
echo "List all the files that have changed: ${{ steps.changed-files-yml.outputs.test_all_changed_files }}"
|
||||
echo "List all the files that have changed: ${{ steps.changed-files-yaml.outputs.test_all_changed_files }}"
|
||||
|
||||
- name: Run step if doc file(s) change
|
||||
if: steps.changed-files-yml.outputs.doc_any_changed == 'true'
|
||||
if: steps.changed-files-yaml.outputs.doc_any_changed == 'true'
|
||||
run: |
|
||||
echo "One or more doc file(s) has changed."
|
||||
echo "List all the files that have changed: ${{ steps.changed-files-yml.outputs.doc_all_changed_files }}"
|
||||
echo "List all the files that have changed: ${{ steps.changed-files-yaml.outputs.doc_all_changed_files }}"
|
||||
```
|
||||
|
||||
#### Using Github's API
|
||||
|
||||
```yaml
|
||||
name: CI
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
# -------------------------------------------------------------
|
||||
# Event `pull_request`: Returns all changed pull request files.
|
||||
# --------------------------------------------------------------
|
||||
changed_files:
|
||||
# NOTE:
|
||||
# - This is limited to pull_request* events and would raise an error for other events.
|
||||
# - A maximum of 3000 files can be returned.
|
||||
# - For more flexibility and no limitations see "Using local .git history" above.
|
||||
|
||||
runs-on: ubuntu-latest # windows-latest || macos-latest
|
||||
name: Test changed-files
|
||||
permissions:
|
||||
pull-requests: read
|
||||
|
||||
steps:
|
||||
- name: Get changed files
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@v37
|
||||
|
||||
- name: List all changed files
|
||||
run: |
|
||||
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
|
||||
echo "$file was changed"
|
||||
done
|
||||
```
|
||||
|
||||
### On `push`
|
||||
|
||||
```yaml
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
# -------------------------------
|
||||
# Optionally run on other events
|
||||
# -------------------------------
|
||||
# schedule:
|
||||
# - cron: '0 0 * * *'
|
||||
#
|
||||
# release:
|
||||
# types: [published]
|
||||
#
|
||||
# push:
|
||||
# tags:
|
||||
# - '**'
|
||||
#
|
||||
# ...and many more
|
||||
|
||||
|
||||
jobs:
|
||||
# -------------------------------------------------------------
|
||||
# Using GitHub's API is not supported for push events
|
||||
# -------------------------------------------------------------
|
||||
#
|
||||
# ----------------------------------------------------------------------------------------------
|
||||
# Using local .git history
|
||||
# ----------------------------------------------------------------------------------------------
|
||||
# Event `push`: Compare the preceding remote commit -> to the current commit of the main branch
|
||||
# ----------------------------------------------------------------------------------------------
|
||||
changed_files:
|
||||
runs-on: ubuntu-latest # windows-latest || macos-latest
|
||||
name: Test changed-files
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0 # OR "2" -> To retrieve the preceding commit.
|
||||
|
||||
# Example 1
|
||||
- name: Get changed files
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@v37
|
||||
|
||||
# NOTE: `since_last_remote_commit: true` is implied by default and falls back to the previous local commit.
|
||||
|
||||
- name: List all changed files
|
||||
run: |
|
||||
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
|
||||
echo "$file was changed"
|
||||
done
|
||||
|
||||
# Example 2: See above
|
||||
...
|
||||
|
||||
# Example 3: See above
|
||||
...
|
||||
```
|
||||
|
||||
To access more examples, navigate to the [Examples](#examples) section.
|
||||
@@ -253,46 +343,52 @@ Support this project with a :star:
|
||||
|
||||
<!-- AUTO-DOC-INPUT:START - Do not remove or modify this section -->
|
||||
|
||||
| INPUT | TYPE | REQUIRED | DEFAULT | DESCRIPTION |
|
||||
|------------------------------------------------------------------------------|--------|----------|---------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| base\_sha | string | false | | Specify a different base commit <br>SHA used for comparing changes |
|
||||
| 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. |
|
||||
| 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`. |
|
||||
| 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`. |
|
||||
| ~~dir\_names\_exclude\_root~~ <br> Use `dir_names_exclude_current_dir` instead. | string | false | `"false"` | **Deprecated:** Exclude the root directory <br>represented by `.` from the <br>output when `dir_names`is set to <br>`true`. |
|
||||
| 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`. |
|
||||
| escape\_json | string | false | `"true"` | Escape JSON output. |
|
||||
| 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. |
|
||||
| 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. |
|
||||
| files\_from\_source\_file | string | false | | Source file(s) used to populate <br>the `files` input. |
|
||||
| files\_from\_source\_file\_separator | string | false | `"\n"` | Separator used to split the <br>`files_from_source_file` input |
|
||||
| files\_ignore | string | false | | Ignore changes to these file(s) <br>**NOTE:** Multiline file/directory patterns should <br>not include quotes. |
|
||||
| files\_ignore\_from\_source\_file | string | false | | Source file(s) used to populate <br>the `files_ignore` input |
|
||||
| files\_ignore\_from\_source\_file\_separator | string | false | `"\n"` | Separator used to split the <br>`files_ignore_from_source_file` input |
|
||||
| files\_ignore\_separator | string | false | `"\n"` | Separator used to split the <br>`files_ignore` input |
|
||||
| files\_ignore\_yaml | string | false | | YAML used to define a <br>set of file patterns to <br>ignore changes |
|
||||
| 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) |
|
||||
| files\_ignore\_yaml\_from\_source\_file\_separator | string | false | `"\n"` | Separator used to split the <br>`files_ignore_yaml_from_source_file` input |
|
||||
| files\_separator | string | false | `"\n"` | Separator used to split the <br>`files` input |
|
||||
| files\_yaml | string | false | | YAML used to define a <br>set of file patterns to <br>detect changes |
|
||||
| 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) |
|
||||
| files\_yaml\_from\_source\_file\_separator | string | false | `"\n"` | Separator used to split the <br>`files_yaml_from_source_file` 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). |
|
||||
| json | string | false | `"false"` | Output list of changed files <br>in a JSON formatted string <br>which can be used for <br>matrix jobs. |
|
||||
| old\_new\_files\_separator | string | false | `" "` | Split character for old and <br>new renamed filename pairs. |
|
||||
| old\_new\_separator | string | false | `","` | Split character for old and <br>new filename pairs. |
|
||||
| output\_dir | string | false | `".github/outputs"` | Directory to store output files. |
|
||||
| output\_renamed\_files\_as\_deleted\_and\_added | string | false | `"false"` | Output renamed files as deleted <br>and added files. |
|
||||
| path | string | false | `"."` | Specify a relative path under <br>`$GITHUB_WORKSPACE` to locate the repository. |
|
||||
| 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` |
|
||||
| recover\_deleted\_files | string | false | `"false"` | Recover deleted files. |
|
||||
| recover\_deleted\_files\_to\_destination | string | false | | Recover deleted files to a <br>new destination directory, defaults to <br>the original location. |
|
||||
| separator | string | false | `" "` | Split character for output strings |
|
||||
| sha | string | false | | Specify a different commit SHA <br>used for comparing changes |
|
||||
| since | string | false | | Get changed files for commits <br>whose timestamp is older than <br>the given time. |
|
||||
| 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. |
|
||||
| until | string | false | | Get changed files for commits <br>whose timestamp is earlier than <br>the given time. |
|
||||
| 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`. |
|
||||
| INPUT | TYPE | REQUIRED | DEFAULT | DESCRIPTION |
|
||||
|----------------------------------------------|--------|----------|---------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| api\_url | string | false | `"${{ github.api_url }}"` | Github API URL. |
|
||||
| base\_sha | string | false | | Specify a different base commit <br>SHA used for comparing changes |
|
||||
| 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. |
|
||||
| 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`. |
|
||||
| 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`. |
|
||||
| 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`. |
|
||||
| escape\_json | string | false | `"true"` | Escape JSON output. |
|
||||
| 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. |
|
||||
| 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. |
|
||||
| files\_from\_source\_file | string | false | | Source file(s) used to populate <br>the `files` input. |
|
||||
| files\_from\_source\_file\_separator | string | false | `"\n"` | Separator used to split the <br>`files_from_source_file` input |
|
||||
| files\_ignore | string | false | | Ignore changes to these file(s) <br>**NOTE:** Multiline file/directory patterns should <br>not include quotes. |
|
||||
| files\_ignore\_from\_source\_file | string | false | | Source file(s) used to populate <br>the `files_ignore` input |
|
||||
| files\_ignore\_from\_source\_file\_separator | string | false | `"\n"` | Separator used to split the <br>`files_ignore_from_source_file` input |
|
||||
| files\_ignore\_separator | string | false | `"\n"` | Separator used to split the <br>`files_ignore` input |
|
||||
| files\_ignore\_yaml | string | false | | YAML used to define a <br>set of file patterns to <br>ignore changes |
|
||||
| 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) |
|
||||
| files\_ignore\_yaml\_from\_source\_file\_separator | string | false | `"\n"` | Separator used to split the <br>`files_ignore_yaml_from_source_file` input |
|
||||
| files\_separator | string | false | `"\n"` | Separator used to split the <br>`files` input |
|
||||
| files\_yaml | string | false | | YAML used to define a <br>set of file patterns to <br>detect changes |
|
||||
| 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) |
|
||||
| files\_yaml\_from\_source\_file\_separator | string | false | `"\n"` | Separator used to split the <br>`files_yaml_from_source_file` 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). |
|
||||
| json | string | false | `"false"` | Output list of changed files <br>in a JSON formatted string <br>which can be used for <br>matrix jobs. |
|
||||
| old\_new\_files\_separator | string | false | `" "` | Split character for old and <br>new renamed filename pairs. |
|
||||
| old\_new\_separator | string | false | `","` | Split character for old and <br>new filename pairs. |
|
||||
| output\_dir | string | false | `".github/outputs"` | Directory to store output files. |
|
||||
| output\_renamed\_files\_as\_deleted\_and\_added | string | false | `"false"` | Output renamed files as deleted <br>and added files. |
|
||||
| path | string | false | `"."` | Specify a relative path under <br>`$GITHUB_WORKSPACE` to locate the repository. |
|
||||
| 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` |
|
||||
| recover\_deleted\_files | string | false | `"false"` | Recover deleted files. |
|
||||
| recover\_deleted\_files\_to\_destination | string | false | | Recover deleted files to a <br>new destination directory, defaults to <br>the original location. |
|
||||
| recover\_files | string | false | | File and directory patterns used <br>to recover deleted files. |
|
||||
| recover\_files\_ignore | string | false | | File and directory patterns to <br>ignore when recovering deleted files. |
|
||||
| recover\_files\_ignore\_separator | string | false | `"\n"` | Separator used to split the <br>`recover_files_ignore` input |
|
||||
| recover\_files\_separator | string | false | `"\n"` | Separator used to split the <br>`recover_files` input |
|
||||
| separator | string | false | `" "` | Split character for output strings |
|
||||
| sha | string | false | | Specify a different commit SHA <br>used for comparing changes |
|
||||
| since | string | false | | Get changed files for commits <br>whose timestamp is older than <br>the given time. |
|
||||
| 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. |
|
||||
| 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. |
|
||||
| token | string | false | `"${{ github.token }}"` | Github token used to fetch <br>changed files from Github's API. |
|
||||
| until | string | false | | Get changed files for commits <br>whose timestamp is earlier than <br>the given time. |
|
||||
| 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 -->
|
||||
|
||||
@@ -317,20 +413,20 @@ The format of the version string is as follows:
|
||||
...
|
||||
- name: Get changed files
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@v36
|
||||
uses: tj-actions/changed-files@v37
|
||||
...
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Get all changed files and using a comma separator</summary>
|
||||
<summary>Get all changed files and use a comma separator</summary>
|
||||
|
||||
```yaml
|
||||
...
|
||||
- name: Get all changed files and use a comma separator in the output
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@v36
|
||||
uses: tj-actions/changed-files@v37
|
||||
with:
|
||||
separator: ","
|
||||
...
|
||||
@@ -347,7 +443,7 @@ See [inputs](#inputs) for more information.
|
||||
...
|
||||
- name: Get changed files
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@v36
|
||||
uses: tj-actions/changed-files@v37
|
||||
|
||||
- name: List all added files
|
||||
run: |
|
||||
@@ -368,7 +464,7 @@ See [outputs](#outputs) for a list of all available outputs.
|
||||
...
|
||||
- name: Get changed files
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@v36
|
||||
uses: tj-actions/changed-files@v37
|
||||
|
||||
- name: Run a step if my-file.txt was modified
|
||||
if: contains(steps.changed-files.outputs.modified_files, 'my-file.txt')
|
||||
@@ -387,7 +483,7 @@ See [outputs](#outputs) for a list of all available outputs.
|
||||
```yaml
|
||||
...
|
||||
|
||||
- name: Get changed files and write the outputs to a txt file
|
||||
- name: Get changed files and write the outputs to a Txt file
|
||||
id: changed-files-write-output-files-txt
|
||||
uses: ./
|
||||
with:
|
||||
@@ -406,7 +502,7 @@ See [outputs](#outputs) for a list of all available outputs.
|
||||
|
||||
```yaml
|
||||
...
|
||||
- name: Get changed files and write the outputs to a json file
|
||||
- name: Get changed files and write the outputs to a JSON file
|
||||
id: changed-files-write-output-files-json
|
||||
uses: ./
|
||||
with:
|
||||
@@ -428,7 +524,7 @@ See [outputs](#outputs) for a list of all available outputs.
|
||||
...
|
||||
- name: Get changed files
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@v36
|
||||
uses: tj-actions/changed-files@v37
|
||||
with:
|
||||
files: |
|
||||
my-file.txt
|
||||
@@ -436,7 +532,7 @@ See [outputs](#outputs) for a list of all available outputs.
|
||||
*.png
|
||||
!*.md
|
||||
test_directory
|
||||
**/*.sql
|
||||
**.sql
|
||||
...
|
||||
```
|
||||
|
||||
@@ -451,7 +547,7 @@ See [inputs](#inputs) for more information.
|
||||
...
|
||||
- name: Get changed files
|
||||
id: changed-files-specific
|
||||
uses: tj-actions/changed-files@v36
|
||||
uses: tj-actions/changed-files@v37
|
||||
with:
|
||||
files: |
|
||||
my-file.txt
|
||||
@@ -459,7 +555,7 @@ See [inputs](#inputs) for more information.
|
||||
*.png
|
||||
!*.md
|
||||
test_directory
|
||||
**/*.sql
|
||||
**.sql
|
||||
|
||||
- name: Run step if any of the listed files above change
|
||||
if: steps.changed-files-specific.outputs.any_changed == 'true'
|
||||
@@ -498,7 +594,7 @@ See [outputs](#outputs) for a list of all available outputs.
|
||||
...
|
||||
- name: Get changed files using a source file or list of file(s) to populate to files input.
|
||||
id: changed-files-specific-source-file
|
||||
uses: tj-actions/changed-files@v36
|
||||
uses: tj-actions/changed-files@v37
|
||||
with:
|
||||
files_from_source_file: test/changed-files-list.txt
|
||||
...
|
||||
@@ -515,7 +611,7 @@ See [inputs](#inputs) for more information.
|
||||
...
|
||||
- name: Get changed files using a source file or list of file(s) to populate to files input and optionally specify more files.
|
||||
id: changed-files-specific-source-file-and-specify-files
|
||||
uses: tj-actions/changed-files@v36
|
||||
uses: tj-actions/changed-files@v37
|
||||
with:
|
||||
files_from_source_file: |
|
||||
test/changed-files-list.txt
|
||||
@@ -536,7 +632,7 @@ See [inputs](#inputs) for more information.
|
||||
...
|
||||
- name: Get changed files using a different SHA
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@v36
|
||||
uses: tj-actions/changed-files@v37
|
||||
with:
|
||||
sha: ${{ github.event.pull_request.head.sha }}
|
||||
...
|
||||
@@ -553,7 +649,7 @@ See [inputs](#inputs) for more information.
|
||||
...
|
||||
- name: Get changed files using a different base SHA
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@v36
|
||||
uses: tj-actions/changed-files@v37
|
||||
with:
|
||||
base_sha: ${{ github.event.pull_request.base.sha }}
|
||||
...
|
||||
@@ -585,11 +681,11 @@ jobs:
|
||||
|
||||
- name: Get changed files
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@v36
|
||||
uses: tj-actions/changed-files@v37
|
||||
|
||||
- name: Get changed files in the .github folder
|
||||
id: changed-files-specific
|
||||
uses: tj-actions/changed-files@v36
|
||||
uses: tj-actions/changed-files@v37
|
||||
with:
|
||||
base_sha: ${{ steps.get-base-sha.outputs.base_sha }}
|
||||
files: .github/**
|
||||
@@ -619,7 +715,7 @@ See [inputs](#inputs) for more information.
|
||||
|
||||
- name: Run changed-files with defaults in dir1
|
||||
id: changed-files-for-dir1
|
||||
uses: tj-actions/changed-files@v36
|
||||
uses: tj-actions/changed-files@v37
|
||||
with:
|
||||
path: dir1
|
||||
|
||||
@@ -636,13 +732,13 @@ See [inputs](#inputs) for more information.
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Get all changed files with non äšćįí characters i.e (Filename in other languages)</summary>
|
||||
<summary>Get all changed files with non-äšćįí characters i.e (Filename in other languages)</summary>
|
||||
|
||||
```yaml
|
||||
...
|
||||
- name: Run changed-files with quotepath disabled
|
||||
id: changed-files-quotepath
|
||||
uses: tj-actions/changed-files@v36
|
||||
uses: tj-actions/changed-files@v37
|
||||
with:
|
||||
quotepath: "false"
|
||||
|
||||
@@ -681,7 +777,7 @@ See [inputs](#inputs) for more information.
|
||||
|
||||
- name: Run changed-files with the commit of the last successful test workflow run
|
||||
id: changed-files-base-sha-push
|
||||
uses: tj-actions/changed-files@v36
|
||||
uses: tj-actions/changed-files@v37
|
||||
with:
|
||||
base_sha: ${{ steps.last_successful_commit_push.outputs.base }}
|
||||
...
|
||||
@@ -703,12 +799,12 @@ See [inputs](#inputs) for more information.
|
||||
- uses: nrwl/nx-set-shas@v3
|
||||
id: last_successful_commit_pull_request
|
||||
with:
|
||||
main-branch-name: ${{ steps.branch-name.outputs.base_ref_branch }} # Get the last successful commit on master or main branch
|
||||
main-branch-name: ${{ steps.branch-name.outputs.base_ref_branch }} # Get the last successful commit on the master or main branch
|
||||
workflow_id: 'test.yml'
|
||||
|
||||
- name: Run changed-files with the commit of the last successful test workflow run on main
|
||||
- name: Run changed-files with the commit of the last successful test workflow run on the main branch
|
||||
id: changed-files-base-sha-pull-request
|
||||
uses: tj-actions/changed-files@v36
|
||||
uses: tj-actions/changed-files@v37
|
||||
with:
|
||||
base_sha: ${{ steps.last_successful_commit_pull_request.outputs.base }}
|
||||
...
|
||||
@@ -732,7 +828,7 @@ See [inputs](#inputs) for more information.
|
||||
...
|
||||
- name: Run changed-files with dir_names
|
||||
id: changed-files-dir-names
|
||||
uses: tj-actions/changed-files@v36
|
||||
uses: tj-actions/changed-files@v37
|
||||
with:
|
||||
dir_names: "true"
|
||||
...
|
||||
@@ -747,9 +843,9 @@ See [inputs](#inputs) for more information.
|
||||
|
||||
```yaml
|
||||
...
|
||||
- name: Run changed-files with json output
|
||||
- name: Run changed-files with JSON output
|
||||
id: changed-files-json
|
||||
uses: tj-actions/changed-files@v36
|
||||
uses: tj-actions/changed-files@v37
|
||||
with:
|
||||
json: "true"
|
||||
...
|
||||
@@ -766,13 +862,13 @@ See [inputs](#inputs) for more information.
|
||||
...
|
||||
- name: Get changed-files since 2022-08-19
|
||||
id: changed-files-since
|
||||
uses: tj-actions/changed-files@v36
|
||||
uses: tj-actions/changed-files@v37
|
||||
with:
|
||||
since: "2022-08-19"
|
||||
|
||||
- name: Get changed-files until 2022-08-20
|
||||
id: changed-files-until
|
||||
uses: tj-actions/changed-files@v36
|
||||
uses: tj-actions/changed-files@v37
|
||||
with:
|
||||
until: "2022-08-20"
|
||||
...
|
||||
@@ -782,7 +878,7 @@ See [inputs](#inputs) for more information.
|
||||
|
||||
</details>
|
||||
|
||||
## Real world usage
|
||||
## Real-world usage
|
||||
|
||||
* [vitejs/vite: uses tj-actions/changed-files to automate testing](https://github.com/vitejs/vite/blob/8da04227d6f818a8ad9efc0056101968037c2e36/.github/workflows/ci.yml#L61)
|
||||
|
||||
@@ -798,6 +894,8 @@ See [inputs](#inputs) for more information.
|
||||
|
||||
* [aws-doc-sdk-examples: uses tj-actions/changed-files to automate testing](https://github.com/awsdocs/aws-doc-sdk-examples/blob/2393723ef6b0cad9502f4852f5c72f7be58ca89d/.github/workflows/javascript.yml#L22)
|
||||
|
||||
* [nhost: uses tj-actions/changed-files to automate testing based on changes detected](https://github.com/nhost/nhost/blob/main/.github/workflows/ci.yaml#L44-L48)
|
||||
|
||||

|
||||
|
||||
And many more...
|
||||
@@ -807,7 +905,7 @@ And many more...
|
||||
> **Warning**:
|
||||
>
|
||||
> * Spaces in file names can introduce bugs when using bash loops. See: [#216](https://github.com/tj-actions/changed-files/issues/216)
|
||||
> However, this action will handle spaces in file names, with a recommendation of using a separator to prevent hidden issues.
|
||||
> However, this action will handle spaces in file names, with a recommendation of using a separator to prevent any hidden issues.
|
||||
>
|
||||
> 
|
||||
|
||||
|
||||
33
action.yml
33
action.yml
@@ -112,11 +112,6 @@ inputs:
|
||||
description: "Exclude the current directory represented by `.` from the output when `dir_names` is set to `true`."
|
||||
required: false
|
||||
default: "false"
|
||||
dir_names_exclude_root:
|
||||
description: "Exclude the root directory represented by `.` from the output when `dir_names`is set to `true`."
|
||||
required: false
|
||||
default: "false"
|
||||
deprecationMessage: "Use `dir_names_exclude_current_dir` instead."
|
||||
json:
|
||||
description: "Output list of changed files in a JSON formatted string which can be used for matrix jobs."
|
||||
required: false
|
||||
@@ -129,6 +124,10 @@ inputs:
|
||||
description: "Depth of additional branch history fetched. **NOTE**: This can be adjusted to resolve errors with insufficient history."
|
||||
required: false
|
||||
default: "50"
|
||||
skip_initial_fetch:
|
||||
description: "Skip the initial fetch to improve performance for shallow repositories. **NOTE**: This could lead to errors with missing history and the intended use is limited to when you've fetched the history necessary to perform the diff."
|
||||
required: false
|
||||
default: "false"
|
||||
since_last_remote_commit:
|
||||
description: "Use the last commit on the remote branch as the `base_sha`. Defaults to the last non-merge commit on the target branch for pull request events and the previous remote commit of the current branch for push events."
|
||||
required: false
|
||||
@@ -153,6 +152,30 @@ inputs:
|
||||
description: "Recover deleted files to a new destination directory, defaults to the original location."
|
||||
required: false
|
||||
default: ""
|
||||
recover_files:
|
||||
description: "File and directory patterns used to recover deleted files."
|
||||
required: false
|
||||
default: ""
|
||||
recover_files_separator:
|
||||
description: "Separator used to split the `recover_files` input"
|
||||
default: "\n"
|
||||
required: false
|
||||
recover_files_ignore:
|
||||
description: "File and directory patterns to ignore when recovering deleted files."
|
||||
required: false
|
||||
default: ""
|
||||
recover_files_ignore_separator:
|
||||
description: "Separator used to split the `recover_files_ignore` input"
|
||||
default: "\n"
|
||||
required: false
|
||||
token:
|
||||
description: "Github token used to fetch changed files from Github's API."
|
||||
required: false
|
||||
default: ${{ github.token }}
|
||||
api_url:
|
||||
description: "Github API URL."
|
||||
required: false
|
||||
default: ${{ github.api_url }}
|
||||
|
||||
outputs:
|
||||
added_files:
|
||||
|
||||
7602
dist/index.js
generated
vendored
7602
dist/index.js
generated
vendored
File diff suppressed because one or more lines are too long
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
562
dist/licenses.txt
generated
vendored
562
dist/licenses.txt
generated
vendored
@@ -22,6 +22,18 @@ The above copyright notice and this permission notice shall be included in all c
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
@actions/github
|
||||
MIT
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright 2019 GitHub
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
@actions/http-client
|
||||
MIT
|
||||
Actions Http Client for Node.js
|
||||
@@ -59,6 +71,393 @@ The above copyright notice and this permission notice shall be included in all c
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
@octokit/auth-token
|
||||
MIT
|
||||
The MIT License
|
||||
|
||||
Copyright (c) 2019 Octokit contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
|
||||
@octokit/core
|
||||
MIT
|
||||
The MIT License
|
||||
|
||||
Copyright (c) 2019 Octokit contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
|
||||
@octokit/endpoint
|
||||
MIT
|
||||
The MIT License
|
||||
|
||||
Copyright (c) 2018 Octokit contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
|
||||
@octokit/graphql
|
||||
MIT
|
||||
The MIT License
|
||||
|
||||
Copyright (c) 2018 Octokit contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
|
||||
@octokit/plugin-paginate-rest
|
||||
MIT
|
||||
MIT License Copyright (c) 2019 Octokit contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
|
||||
@octokit/plugin-rest-endpoint-methods
|
||||
MIT
|
||||
MIT License Copyright (c) 2019 Octokit contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
|
||||
@octokit/request
|
||||
MIT
|
||||
The MIT License
|
||||
|
||||
Copyright (c) 2018 Octokit contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
|
||||
@octokit/request-error
|
||||
MIT
|
||||
The MIT License
|
||||
|
||||
Copyright (c) 2019 Octokit contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
|
||||
@vercel/ncc
|
||||
MIT
|
||||
Copyright 2018 ZEIT, Inc.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
before-after-hook
|
||||
Apache-2.0
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "{}"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright 2018 Gregor Martynus and other contributors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
|
||||
braces
|
||||
MIT
|
||||
The MIT License (MIT)
|
||||
@@ -84,6 +483,25 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
|
||||
deprecation
|
||||
ISC
|
||||
The ISC License
|
||||
|
||||
Copyright (c) Gregor Martynus and contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
||||
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
|
||||
fill-range
|
||||
MIT
|
||||
The MIT License (MIT)
|
||||
@@ -134,6 +552,31 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
|
||||
is-plain-object
|
||||
MIT
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014-2017, Jon Schlinkert.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
|
||||
lodash
|
||||
MIT
|
||||
Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
||||
@@ -210,6 +653,51 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
|
||||
node-fetch
|
||||
MIT
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2016 David Frank
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
|
||||
|
||||
once
|
||||
ISC
|
||||
The ISC License
|
||||
|
||||
Copyright (c) Isaac Z. Schlueter and Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
||||
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
|
||||
picomatch
|
||||
MIT
|
||||
The MIT License (MIT)
|
||||
@@ -260,6 +748,9 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
|
||||
tr46
|
||||
MIT
|
||||
|
||||
tunnel
|
||||
MIT
|
||||
The MIT License (MIT)
|
||||
@@ -285,6 +776,17 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
|
||||
universal-user-agent
|
||||
ISC
|
||||
# [ISC License](https://spdx.org/licenses/ISC)
|
||||
|
||||
Copyright (c) 2018, Gregor Martynus (https://github.com/gr2m)
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
|
||||
uuid
|
||||
MIT
|
||||
The MIT License (MIT)
|
||||
@@ -298,6 +800,66 @@ The above copyright notice and this permission notice shall be included in all c
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
|
||||
webidl-conversions
|
||||
BSD-2-Clause
|
||||
# The BSD 2-Clause License
|
||||
|
||||
Copyright (c) 2014, Domenic Denicola
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
whatwg-url
|
||||
MIT
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015–2016 Sebastian Mayr
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
|
||||
wrappy
|
||||
ISC
|
||||
The ISC License
|
||||
|
||||
Copyright (c) Isaac Z. Schlueter and Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
||||
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
|
||||
yaml
|
||||
ISC
|
||||
Copyright Eemeli Aro <eemeli@gmail.com>
|
||||
|
||||
36
package.json
36
package.json
@@ -32,28 +32,30 @@
|
||||
},
|
||||
"homepage": "https://github.com/tj-actions/glob#readme",
|
||||
"dependencies": {
|
||||
"@actions/core": "1.10.0",
|
||||
"@actions/exec": "1.1.1",
|
||||
"lodash": "^4.17.15",
|
||||
"@actions/core": "^1.10.0",
|
||||
"@actions/exec": "^1.1.1",
|
||||
"@actions/github": "^5.1.1",
|
||||
"@octokit/rest": "^19.0.13",
|
||||
"lodash": "^4.17.21",
|
||||
"micromatch": "^4.0.5",
|
||||
"yaml": "^2.3.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/jest": "29.5.2",
|
||||
"@types/jest": "^29.5.2",
|
||||
"@types/lodash": "^4.14.195",
|
||||
"@types/micromatch": "^4.0.2",
|
||||
"@types/node": "20.2.1",
|
||||
"@types/uuid": "9.0.2",
|
||||
"@typescript-eslint/eslint-plugin": "5.60.0",
|
||||
"@typescript-eslint/parser": "5.60.0",
|
||||
"@vercel/ncc": "0.36.1",
|
||||
"eslint": "8.43.0",
|
||||
"eslint-plugin-github": "4.8.0",
|
||||
"eslint-plugin-jest": "27.2.2",
|
||||
"eslint-plugin-prettier": "^4.2.1",
|
||||
"jest": "29.5.0",
|
||||
"prettier": "2.8.8",
|
||||
"ts-jest": "29.1.0",
|
||||
"typescript": "5.1.3"
|
||||
"@types/node": "^20.3.2",
|
||||
"@types/uuid": "^9.0.2",
|
||||
"@typescript-eslint/eslint-plugin": "^6.0.0",
|
||||
"@typescript-eslint/parser": "^6.0.0",
|
||||
"@vercel/ncc": "^0.36.1",
|
||||
"eslint": "^8.43.0",
|
||||
"eslint-plugin-github": "^4.8.0",
|
||||
"eslint-plugin-jest": "^27.2.2",
|
||||
"eslint-plugin-prettier": "^5.0.0-alpha.2",
|
||||
"jest": "^29.5.0",
|
||||
"prettier": "^3.0.0",
|
||||
"ts-jest": "^29.1.0",
|
||||
"typescript": "^5.1.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
"config:base"
|
||||
],
|
||||
"enabled": true,
|
||||
"prHourlyLimit": 30,
|
||||
"prConcurrentLimit": 10,
|
||||
"prHourlyLimit": 10,
|
||||
"prConcurrentLimit": 5,
|
||||
"rebaseWhen": "behind-base-branch",
|
||||
"addLabels": [
|
||||
"dependencies",
|
||||
@@ -20,13 +20,21 @@
|
||||
"enabled": true,
|
||||
"automerge": true
|
||||
},
|
||||
"nvm": {
|
||||
"enabled": false
|
||||
},
|
||||
"packageRules": [
|
||||
{
|
||||
"matchUpdateTypes": ["minor", "patch", "pin", "digest"],
|
||||
"matchUpdateTypes": [
|
||||
"minor",
|
||||
"patch",
|
||||
"pin",
|
||||
"digest"
|
||||
],
|
||||
"automerge": true,
|
||||
"rebaseWhen": "behind-base-branch",
|
||||
"addLabels": [
|
||||
"automerge"
|
||||
"merge when passing"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -34,10 +42,15 @@
|
||||
"matchLanguages": [
|
||||
"docker"
|
||||
],
|
||||
"matchUpdateTypes": ["minor", "patch", "pin", "digest"],
|
||||
"matchUpdateTypes": [
|
||||
"minor",
|
||||
"patch",
|
||||
"pin",
|
||||
"digest"
|
||||
],
|
||||
"rebaseWhen": "behind-base-branch",
|
||||
"addLabels": [
|
||||
"automerge"
|
||||
"merge when passing"
|
||||
],
|
||||
"automerge": true
|
||||
}
|
||||
|
||||
@@ -1,15 +1,18 @@
|
||||
import * as core from '@actions/core'
|
||||
import * as github from '@actions/github'
|
||||
import type {RestEndpointMethodTypes} from '@octokit/rest'
|
||||
import flatten from 'lodash/flatten'
|
||||
import * as path from 'path'
|
||||
|
||||
import {DiffResult} from './commitSha'
|
||||
import {Inputs} from './inputs'
|
||||
import {
|
||||
getAllChangedFiles,
|
||||
getDirnameMaxDepth,
|
||||
gitRenamedFiles,
|
||||
gitSubmoduleDiffSHA,
|
||||
jsonOutput,
|
||||
getAllChangedFiles
|
||||
jsonOutput
|
||||
} from './utils'
|
||||
import flatten from 'lodash/flatten'
|
||||
|
||||
export const getRenamedFiles = async ({
|
||||
inputs,
|
||||
@@ -168,8 +171,7 @@ function* getChangeTypeFilesGenerator({
|
||||
yield getDirnameMaxDepth({
|
||||
pathStr: file,
|
||||
dirNamesMaxDepth: inputs.dirNamesMaxDepth,
|
||||
excludeCurrentDir:
|
||||
inputs.dirNamesExcludeRoot || inputs.dirNamesExcludeCurrentDir
|
||||
excludeCurrentDir: inputs.dirNamesExcludeCurrentDir
|
||||
})
|
||||
} else {
|
||||
yield file
|
||||
@@ -189,7 +191,7 @@ export const getChangeTypeFiles = async ({
|
||||
}): Promise<{paths: string; count: string}> => {
|
||||
const files = [
|
||||
...new Set(getChangeTypeFilesGenerator({inputs, changedFiles, changeTypes}))
|
||||
]
|
||||
].filter(Boolean)
|
||||
|
||||
if (inputs.json) {
|
||||
return {
|
||||
@@ -216,8 +218,7 @@ function* getAllChangeTypeFilesGenerator({
|
||||
yield getDirnameMaxDepth({
|
||||
pathStr: file,
|
||||
dirNamesMaxDepth: inputs.dirNamesMaxDepth,
|
||||
excludeCurrentDir:
|
||||
inputs.dirNamesExcludeRoot || inputs.dirNamesExcludeCurrentDir
|
||||
excludeCurrentDir: inputs.dirNamesExcludeCurrentDir
|
||||
})
|
||||
} else {
|
||||
yield file
|
||||
@@ -234,7 +235,7 @@ export const getAllChangeTypeFiles = async ({
|
||||
}): Promise<{paths: string; count: string}> => {
|
||||
const files = [
|
||||
...new Set(getAllChangeTypeFilesGenerator({inputs, changedFiles}))
|
||||
]
|
||||
].filter(Boolean)
|
||||
|
||||
if (inputs.json) {
|
||||
return {
|
||||
@@ -248,3 +249,65 @@ export const getAllChangeTypeFiles = async ({
|
||||
count: files.length.toString()
|
||||
}
|
||||
}
|
||||
|
||||
export const getChangedFilesFromGithubAPI = async ({
|
||||
inputs
|
||||
}: {
|
||||
inputs: Inputs
|
||||
}): Promise<ChangedFiles> => {
|
||||
const octokit = github.getOctokit(inputs.token, {
|
||||
baseUrl: inputs.apiUrl
|
||||
})
|
||||
const changedFiles: ChangedFiles = {
|
||||
[ChangeTypeEnum.Added]: [],
|
||||
[ChangeTypeEnum.Copied]: [],
|
||||
[ChangeTypeEnum.Deleted]: [],
|
||||
[ChangeTypeEnum.Modified]: [],
|
||||
[ChangeTypeEnum.Renamed]: [],
|
||||
[ChangeTypeEnum.TypeChanged]: [],
|
||||
[ChangeTypeEnum.Unmerged]: [],
|
||||
[ChangeTypeEnum.Unknown]: []
|
||||
}
|
||||
|
||||
core.info('Getting changed files from GitHub API...')
|
||||
|
||||
const options = octokit.rest.pulls.listFiles.endpoint.merge({
|
||||
owner: github.context.repo.owner,
|
||||
repo: github.context.repo.repo,
|
||||
pull_number: github.context.payload.pull_request?.number,
|
||||
per_page: 100
|
||||
})
|
||||
|
||||
const paginatedResponse = await octokit.paginate<
|
||||
RestEndpointMethodTypes['pulls']['listFiles']['response']['data'][0]
|
||||
>(options)
|
||||
|
||||
core.info(`Found ${paginatedResponse.length} changed files from GitHub API`)
|
||||
const statusMap: Record<string, ChangeTypeEnum> = {
|
||||
added: ChangeTypeEnum.Added,
|
||||
removed: ChangeTypeEnum.Deleted,
|
||||
modified: ChangeTypeEnum.Modified,
|
||||
renamed: ChangeTypeEnum.Renamed,
|
||||
copied: ChangeTypeEnum.Copied,
|
||||
changed: ChangeTypeEnum.TypeChanged,
|
||||
unchanged: ChangeTypeEnum.Unmerged
|
||||
}
|
||||
|
||||
for await (const item of paginatedResponse) {
|
||||
const changeType: ChangeTypeEnum =
|
||||
statusMap[item.status] || ChangeTypeEnum.Unknown
|
||||
|
||||
if (changeType === ChangeTypeEnum.Renamed) {
|
||||
if (inputs.outputRenamedFilesAsDeletedAndAdded) {
|
||||
changedFiles[ChangeTypeEnum.Deleted].push(item.filename)
|
||||
changedFiles[ChangeTypeEnum.Added].push(item.filename)
|
||||
} else {
|
||||
changedFiles[ChangeTypeEnum.Renamed].push(item.filename)
|
||||
}
|
||||
} else {
|
||||
changedFiles[changeType].push(item.filename)
|
||||
}
|
||||
}
|
||||
|
||||
return changedFiles
|
||||
}
|
||||
|
||||
@@ -5,9 +5,8 @@ import {
|
||||
getAllChangeTypeFiles,
|
||||
getChangeTypeFiles
|
||||
} from './changedFiles'
|
||||
import {DiffResult} from './commitSha'
|
||||
import {Inputs} from './inputs'
|
||||
import {getFilteredChangedFiles, recoverDeletedFiles, setOutput} from './utils'
|
||||
import {getFilteredChangedFiles, setOutput} from './utils'
|
||||
|
||||
const getOutputKey = (key: string, outputPrefix: string): string => {
|
||||
return outputPrefix ? `${outputPrefix}_${key}` : key
|
||||
@@ -16,16 +15,12 @@ const getOutputKey = (key: string, outputPrefix: string): string => {
|
||||
export const setChangedFilesOutput = async ({
|
||||
allDiffFiles,
|
||||
inputs,
|
||||
workingDirectory,
|
||||
diffResult,
|
||||
filePatterns = [],
|
||||
outputPrefix = ''
|
||||
}: {
|
||||
allDiffFiles: ChangedFiles
|
||||
filePatterns?: string[]
|
||||
inputs: Inputs
|
||||
workingDirectory: string
|
||||
diffResult: DiffResult
|
||||
filePatterns?: string[]
|
||||
outputPrefix?: string
|
||||
}): Promise<void> => {
|
||||
const allFilteredDiffFiles = await getFilteredChangedFiles({
|
||||
@@ -34,19 +29,12 @@ export const setChangedFilesOutput = async ({
|
||||
})
|
||||
core.debug(`All filtered diff files: ${JSON.stringify(allFilteredDiffFiles)}`)
|
||||
|
||||
await recoverDeletedFiles({
|
||||
inputs,
|
||||
workingDirectory,
|
||||
deletedFiles: allFilteredDiffFiles[ChangeTypeEnum.Deleted],
|
||||
sha: diffResult.previousSha
|
||||
})
|
||||
|
||||
const addedFiles = await getChangeTypeFiles({
|
||||
inputs,
|
||||
changedFiles: allFilteredDiffFiles,
|
||||
changeTypes: [ChangeTypeEnum.Added]
|
||||
})
|
||||
core.debug(`Added files: ${addedFiles}`)
|
||||
core.debug(`Added files: ${JSON.stringify(addedFiles)}`)
|
||||
await setOutput({
|
||||
key: getOutputKey('added_files', outputPrefix),
|
||||
value: addedFiles.paths,
|
||||
@@ -63,7 +51,7 @@ export const setChangedFilesOutput = async ({
|
||||
changedFiles: allFilteredDiffFiles,
|
||||
changeTypes: [ChangeTypeEnum.Copied]
|
||||
})
|
||||
core.debug(`Copied files: ${copiedFiles}`)
|
||||
core.debug(`Copied files: ${JSON.stringify(copiedFiles)}`)
|
||||
await setOutput({
|
||||
key: getOutputKey('copied_files', outputPrefix),
|
||||
value: copiedFiles.paths,
|
||||
@@ -81,7 +69,7 @@ export const setChangedFilesOutput = async ({
|
||||
changedFiles: allFilteredDiffFiles,
|
||||
changeTypes: [ChangeTypeEnum.Modified]
|
||||
})
|
||||
core.debug(`Modified files: ${modifiedFiles}`)
|
||||
core.debug(`Modified files: ${JSON.stringify(modifiedFiles)}`)
|
||||
await setOutput({
|
||||
key: getOutputKey('modified_files', outputPrefix),
|
||||
value: modifiedFiles.paths,
|
||||
@@ -99,7 +87,7 @@ export const setChangedFilesOutput = async ({
|
||||
changedFiles: allFilteredDiffFiles,
|
||||
changeTypes: [ChangeTypeEnum.Renamed]
|
||||
})
|
||||
core.debug(`Renamed files: ${renamedFiles}`)
|
||||
core.debug(`Renamed files: ${JSON.stringify(renamedFiles)}`)
|
||||
await setOutput({
|
||||
key: getOutputKey('renamed_files', outputPrefix),
|
||||
value: renamedFiles.paths,
|
||||
@@ -117,7 +105,7 @@ export const setChangedFilesOutput = async ({
|
||||
changedFiles: allFilteredDiffFiles,
|
||||
changeTypes: [ChangeTypeEnum.TypeChanged]
|
||||
})
|
||||
core.debug(`Type changed files: ${typeChangedFiles}`)
|
||||
core.debug(`Type changed files: ${JSON.stringify(typeChangedFiles)}`)
|
||||
await setOutput({
|
||||
key: getOutputKey('type_changed_files', outputPrefix),
|
||||
value: typeChangedFiles.paths,
|
||||
@@ -135,7 +123,7 @@ export const setChangedFilesOutput = async ({
|
||||
changedFiles: allFilteredDiffFiles,
|
||||
changeTypes: [ChangeTypeEnum.Unmerged]
|
||||
})
|
||||
core.debug(`Unmerged files: ${unmergedFiles}`)
|
||||
core.debug(`Unmerged files: ${JSON.stringify(unmergedFiles)}`)
|
||||
await setOutput({
|
||||
key: getOutputKey('unmerged_files', outputPrefix),
|
||||
value: unmergedFiles.paths,
|
||||
@@ -153,7 +141,7 @@ export const setChangedFilesOutput = async ({
|
||||
changedFiles: allFilteredDiffFiles,
|
||||
changeTypes: [ChangeTypeEnum.Unknown]
|
||||
})
|
||||
core.debug(`Unknown files: ${unknownFiles}`)
|
||||
core.debug(`Unknown files: ${JSON.stringify(unknownFiles)}`)
|
||||
await setOutput({
|
||||
key: getOutputKey('unknown_files', outputPrefix),
|
||||
value: unknownFiles.paths,
|
||||
@@ -170,7 +158,11 @@ export const setChangedFilesOutput = async ({
|
||||
inputs,
|
||||
changedFiles: allFilteredDiffFiles
|
||||
})
|
||||
core.debug(`All changed and modified files: ${allChangedAndModifiedFiles}`)
|
||||
core.debug(
|
||||
`All changed and modified files: ${JSON.stringify(
|
||||
allChangedAndModifiedFiles
|
||||
)}`
|
||||
)
|
||||
await setOutput({
|
||||
key: getOutputKey('all_changed_and_modified_files', outputPrefix),
|
||||
value: allChangedAndModifiedFiles.paths,
|
||||
@@ -193,7 +185,7 @@ export const setChangedFilesOutput = async ({
|
||||
ChangeTypeEnum.Renamed
|
||||
]
|
||||
})
|
||||
core.debug(`All changed files: ${allChangedFiles}`)
|
||||
core.debug(`All changed files: ${JSON.stringify(allChangedFiles)}`)
|
||||
await setOutput({
|
||||
key: getOutputKey('all_changed_files', outputPrefix),
|
||||
value: allChangedFiles.paths,
|
||||
@@ -222,7 +214,7 @@ export const setChangedFilesOutput = async ({
|
||||
ChangeTypeEnum.Renamed
|
||||
]
|
||||
})
|
||||
core.debug(`All other changed files: ${allOtherChangedFiles}`)
|
||||
core.debug(`All other changed files: ${JSON.stringify(allOtherChangedFiles)}`)
|
||||
|
||||
const otherChangedFiles = allOtherChangedFiles.paths
|
||||
.split(inputs.separator)
|
||||
@@ -265,7 +257,7 @@ export const setChangedFilesOutput = async ({
|
||||
ChangeTypeEnum.Deleted
|
||||
]
|
||||
})
|
||||
core.debug(`All modified files: ${allModifiedFiles}`)
|
||||
core.debug(`All modified files: ${JSON.stringify(allModifiedFiles)}`)
|
||||
await setOutput({
|
||||
key: getOutputKey('all_modified_files', outputPrefix),
|
||||
value: allModifiedFiles.paths,
|
||||
@@ -331,7 +323,7 @@ export const setChangedFilesOutput = async ({
|
||||
changedFiles: allFilteredDiffFiles,
|
||||
changeTypes: [ChangeTypeEnum.Deleted]
|
||||
})
|
||||
core.debug(`Deleted files: ${deletedFiles}`)
|
||||
core.debug(`Deleted files: ${JSON.stringify(deletedFiles)}`)
|
||||
await setOutput({
|
||||
key: getOutputKey('deleted_files', outputPrefix),
|
||||
value: deletedFiles.paths,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import * as core from '@actions/core'
|
||||
import * as github from '@actions/github'
|
||||
|
||||
import {Env} from './env'
|
||||
import {Inputs} from './inputs'
|
||||
@@ -15,11 +16,9 @@ import {
|
||||
} from './utils'
|
||||
|
||||
const getCurrentSHA = async ({
|
||||
env,
|
||||
inputs,
|
||||
workingDirectory
|
||||
}: {
|
||||
env: Env
|
||||
inputs: Inputs
|
||||
workingDirectory: string
|
||||
}): Promise<string> => {
|
||||
@@ -50,14 +49,14 @@ const getCurrentSHA = async ({
|
||||
} else {
|
||||
if (!currentSha) {
|
||||
if (
|
||||
env.GITHUB_EVENT_PULL_REQUEST_HEAD_SHA &&
|
||||
github.context.payload.pull_request?.head?.sha &&
|
||||
(await verifyCommitSha({
|
||||
sha: env.GITHUB_EVENT_PULL_REQUEST_HEAD_SHA,
|
||||
sha: github.context.payload.pull_request?.head?.sha,
|
||||
cwd: workingDirectory,
|
||||
showAsErrorMessage: false
|
||||
})) === 0
|
||||
) {
|
||||
currentSha = env.GITHUB_EVENT_PULL_REQUEST_HEAD_SHA
|
||||
currentSha = github.context.payload.pull_request?.head?.sha
|
||||
} else {
|
||||
currentSha = await getHeadSha({cwd: workingDirectory})
|
||||
}
|
||||
@@ -92,13 +91,13 @@ export const getSHAForPushEvent = async (
|
||||
const currentBranch = targetBranch
|
||||
let initialCommit = false
|
||||
|
||||
if (isShallow) {
|
||||
if (isShallow && !inputs.skipInitialFetch) {
|
||||
core.info('Repository is shallow, fetching more history...')
|
||||
|
||||
if (isTag) {
|
||||
const sourceBranch =
|
||||
env.GITHUB_EVENT_BASE_REF.replace('refs/heads/', '') ||
|
||||
env.GITHUB_EVENT_RELEASE_TARGET_COMMITISH
|
||||
github.context.payload.base_ref.replace('refs/heads/', '') ||
|
||||
github.context.payload.release?.target_commitish
|
||||
await gitFetch({
|
||||
cwd: workingDirectory,
|
||||
args: [
|
||||
@@ -137,7 +136,7 @@ export const getSHAForPushEvent = async (
|
||||
}
|
||||
}
|
||||
|
||||
const currentSha = await getCurrentSHA({env, inputs, workingDirectory})
|
||||
const currentSha = await getCurrentSHA({inputs, workingDirectory})
|
||||
let previousSha = inputs.baseSha
|
||||
const diff = '..'
|
||||
|
||||
@@ -191,8 +190,11 @@ export const getSHAForPushEvent = async (
|
||||
targetBranch = tag
|
||||
} else {
|
||||
core.debug('Getting previous SHA for last remote commit...')
|
||||
if (env.GITHUB_EVENT_FORCED === 'false' || !env.GITHUB_EVENT_FORCED) {
|
||||
previousSha = env.GITHUB_EVENT_BEFORE
|
||||
if (
|
||||
github.context.payload.forced === 'false' ||
|
||||
!github.context.payload.forced
|
||||
) {
|
||||
previousSha = github.context.payload.before
|
||||
}
|
||||
|
||||
if (
|
||||
@@ -265,13 +267,13 @@ export const getSHAForPullRequestEvent = async (
|
||||
hasSubmodule: boolean,
|
||||
gitFetchExtraArgs: string[]
|
||||
): Promise<DiffResult> => {
|
||||
let targetBranch = env.GITHUB_EVENT_PULL_REQUEST_BASE_REF
|
||||
const currentBranch = env.GITHUB_EVENT_PULL_REQUEST_HEAD_REF
|
||||
let targetBranch = github.context.payload.pull_request?.base?.ref
|
||||
const currentBranch = github.context.payload.pull_request?.head?.ref
|
||||
if (inputs.sinceLastRemoteCommit) {
|
||||
targetBranch = currentBranch
|
||||
}
|
||||
|
||||
if (isShallow) {
|
||||
if (isShallow && !inputs.skipInitialFetch) {
|
||||
core.info('Repository is shallow, fetching more history...')
|
||||
|
||||
let prFetchExitCode = await gitFetch({
|
||||
@@ -281,7 +283,7 @@ export const getSHAForPullRequestEvent = async (
|
||||
'-u',
|
||||
'--progress',
|
||||
'origin',
|
||||
`pull/${env.GITHUB_EVENT_PULL_REQUEST_NUMBER}/head:${currentBranch}`
|
||||
`pull/${github.context.payload.pull_request?.number}/head:${currentBranch}`
|
||||
]
|
||||
})
|
||||
|
||||
@@ -334,7 +336,7 @@ export const getSHAForPullRequestEvent = async (
|
||||
core.info('Completed fetching more history.')
|
||||
}
|
||||
|
||||
const currentSha = await getCurrentSHA({env, inputs, workingDirectory})
|
||||
const currentSha = await getCurrentSHA({inputs, workingDirectory})
|
||||
let previousSha = inputs.baseSha
|
||||
let diff = '...'
|
||||
|
||||
@@ -362,15 +364,15 @@ export const getSHAForPullRequestEvent = async (
|
||||
}
|
||||
|
||||
if (
|
||||
!env.GITHUB_EVENT_PULL_REQUEST_BASE_REF ||
|
||||
env.GITHUB_EVENT_HEAD_REPO_FORK === 'true'
|
||||
!github.context.payload.pull_request?.base?.ref ||
|
||||
github.context.payload.head?.repo?.fork === 'true'
|
||||
) {
|
||||
diff = '..'
|
||||
}
|
||||
|
||||
if (!previousSha) {
|
||||
if (inputs.sinceLastRemoteCommit) {
|
||||
previousSha = env.GITHUB_EVENT_BEFORE
|
||||
previousSha = github.context.payload.before
|
||||
|
||||
if (
|
||||
!previousSha ||
|
||||
@@ -389,7 +391,7 @@ export const getSHAForPullRequestEvent = async (
|
||||
core.warning(
|
||||
'Unable to locate the previous commit in the local history. Falling back to the pull request base sha.'
|
||||
)
|
||||
previousSha = env.GITHUB_EVENT_PULL_REQUEST_BASE_SHA
|
||||
previousSha = github.context.payload.pull_request?.base?.sha
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -399,7 +401,7 @@ export const getSHAForPullRequestEvent = async (
|
||||
})
|
||||
|
||||
if (!previousSha) {
|
||||
previousSha = env.GITHUB_EVENT_PULL_REQUEST_BASE_SHA
|
||||
previousSha = github.context.payload.pull_request?.base?.sha
|
||||
}
|
||||
|
||||
if (isShallow) {
|
||||
@@ -411,7 +413,7 @@ export const getSHAForPullRequestEvent = async (
|
||||
diff
|
||||
}))
|
||||
) {
|
||||
core.debug(
|
||||
core.info(
|
||||
'Merge base is not in the local history, fetching remote target branch...'
|
||||
)
|
||||
|
||||
@@ -439,17 +441,17 @@ export const getSHAForPullRequestEvent = async (
|
||||
break
|
||||
}
|
||||
|
||||
core.debug(
|
||||
core.info(
|
||||
'Merge base is not in the local history, fetching remote target branch again...'
|
||||
)
|
||||
core.debug(`Attempt ${i}/10`)
|
||||
core.info(`Attempt ${i}/10`)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!previousSha || previousSha === currentSha) {
|
||||
previousSha = env.GITHUB_EVENT_PULL_REQUEST_BASE_SHA
|
||||
previousSha = github.context.payload.pull_request?.base?.sha
|
||||
}
|
||||
}
|
||||
|
||||
@@ -494,7 +496,7 @@ export const getSHAForPullRequestEvent = async (
|
||||
// uses: actions/checkout@v3
|
||||
// with:
|
||||
// repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||
if (env.GITHUB_EVENT_NAME === 'pull_request_target') {
|
||||
if (github.context.eventName === 'pull_request_target') {
|
||||
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.'
|
||||
)
|
||||
|
||||
64
src/env.ts
64
src/env.ts
@@ -1,76 +1,16 @@
|
||||
import {promises as fs} from 'fs'
|
||||
import * as core from '@actions/core'
|
||||
|
||||
export type Env = {
|
||||
GITHUB_REF_NAME: string
|
||||
GITHUB_REF: string
|
||||
GITHUB_WORKSPACE: string
|
||||
GITHUB_EVENT_ACTION: string
|
||||
GITHUB_EVENT_NAME: string
|
||||
GITHUB_EVENT_FORCED: string
|
||||
GITHUB_EVENT_BEFORE: string
|
||||
GITHUB_EVENT_BASE_REF: string
|
||||
GITHUB_EVENT_RELEASE_TARGET_COMMITISH: string
|
||||
GITHUB_EVENT_HEAD_REPO_FORK: string
|
||||
GITHUB_EVENT_PULL_REQUEST_NUMBER: string
|
||||
GITHUB_EVENT_PULL_REQUEST_BASE_SHA: string
|
||||
GITHUB_EVENT_PULL_REQUEST_HEAD_SHA: string
|
||||
GITHUB_EVENT_PULL_REQUEST_HEAD_REF: string
|
||||
GITHUB_EVENT_PULL_REQUEST_BASE_REF: string
|
||||
}
|
||||
|
||||
type GithubEvent = {
|
||||
action?: string
|
||||
forced?: string
|
||||
pull_request?: {
|
||||
head: {
|
||||
ref: string
|
||||
sha: string
|
||||
}
|
||||
base: {
|
||||
ref: string
|
||||
sha: string
|
||||
}
|
||||
number: string
|
||||
}
|
||||
release?: {
|
||||
target_commitish: string
|
||||
}
|
||||
before?: string
|
||||
base_ref?: string
|
||||
head?: {
|
||||
repo?: {
|
||||
fork: string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export const getEnv = async (): Promise<Env> => {
|
||||
const eventPath = process.env.GITHUB_EVENT_PATH
|
||||
let eventJson: GithubEvent = {}
|
||||
|
||||
if (eventPath) {
|
||||
eventJson = JSON.parse(await fs.readFile(eventPath, {encoding: 'utf8'}))
|
||||
}
|
||||
core.debug(`Env: ${JSON.stringify(process.env, null, 2)}`)
|
||||
core.debug(`Event: ${JSON.stringify(eventJson, null, 2)}`)
|
||||
core.debug(`Process Env: ${JSON.stringify(process.env, null, 2)}`)
|
||||
|
||||
return {
|
||||
GITHUB_EVENT_PULL_REQUEST_HEAD_REF: eventJson.pull_request?.head?.ref || '',
|
||||
GITHUB_EVENT_PULL_REQUEST_BASE_REF: eventJson.pull_request?.base?.ref || '',
|
||||
GITHUB_EVENT_BEFORE: eventJson.before || '',
|
||||
GITHUB_EVENT_BASE_REF: eventJson.base_ref || '',
|
||||
GITHUB_EVENT_RELEASE_TARGET_COMMITISH:
|
||||
eventJson.release?.target_commitish || '',
|
||||
GITHUB_EVENT_HEAD_REPO_FORK: eventJson.head?.repo?.fork || '',
|
||||
GITHUB_EVENT_PULL_REQUEST_NUMBER: eventJson.pull_request?.number || '',
|
||||
GITHUB_EVENT_PULL_REQUEST_BASE_SHA: eventJson.pull_request?.base?.sha || '',
|
||||
GITHUB_EVENT_PULL_REQUEST_HEAD_SHA: eventJson.pull_request?.head?.sha || '',
|
||||
GITHUB_EVENT_FORCED: eventJson.forced || '',
|
||||
GITHUB_EVENT_ACTION: eventJson.action || '',
|
||||
GITHUB_REF_NAME: process.env.GITHUB_REF_NAME || '',
|
||||
GITHUB_REF: process.env.GITHUB_REF || '',
|
||||
GITHUB_WORKSPACE: process.env.GITHUB_WORKSPACE || '',
|
||||
GITHUB_EVENT_NAME: process.env.GITHUB_EVENT_NAME || ''
|
||||
GITHUB_WORKSPACE: process.env.GITHUB_WORKSPACE || ''
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,7 +28,6 @@ export type Inputs = {
|
||||
diffRelative: boolean
|
||||
dirNames: boolean
|
||||
dirNamesMaxDepth?: number
|
||||
dirNamesExcludeRoot: boolean
|
||||
dirNamesExcludeCurrentDir: boolean
|
||||
json: boolean
|
||||
escapeJson: boolean
|
||||
@@ -39,6 +38,13 @@ export type Inputs = {
|
||||
outputRenamedFilesAsDeletedAndAdded: boolean
|
||||
recoverDeletedFiles: boolean
|
||||
recoverDeletedFilesToDestination: string
|
||||
recoverFiles: string
|
||||
recoverFilesSeparator: string
|
||||
recoverFilesIgnore: string
|
||||
recoverFilesIgnoreSeparator: string
|
||||
token: string
|
||||
apiUrl: string
|
||||
skipInitialFetch: boolean
|
||||
}
|
||||
|
||||
export const getInputs = (): Inputs => {
|
||||
@@ -123,9 +129,6 @@ export const getInputs = (): Inputs => {
|
||||
const dirNamesMaxDepth = core.getInput('dir_names_max_depth', {
|
||||
required: false
|
||||
})
|
||||
const dirNamesExcludeRoot = core.getBooleanInput('dir_names_exclude_root', {
|
||||
required: false
|
||||
})
|
||||
const dirNamesExcludeCurrentDir = core.getBooleanInput(
|
||||
'dir_names_exclude_current_dir',
|
||||
{
|
||||
@@ -154,6 +157,26 @@ export const getInputs = (): Inputs => {
|
||||
'recover_deleted_files_to_destination',
|
||||
{required: false}
|
||||
)
|
||||
const recoverFiles = core.getInput('recover_files', {required: false})
|
||||
const recoverFilesSeparator = core.getInput('recover_files_separator', {
|
||||
required: false,
|
||||
trimWhitespace: false
|
||||
})
|
||||
const recoverFilesIgnore = core.getInput('recover_files_ignore', {
|
||||
required: false
|
||||
})
|
||||
const recoverFilesIgnoreSeparator = core.getInput(
|
||||
'recover_files_ignore_separator',
|
||||
{
|
||||
required: false,
|
||||
trimWhitespace: false
|
||||
}
|
||||
)
|
||||
const token = core.getInput('token', {required: false})
|
||||
const apiUrl = core.getInput('api_url', {required: false})
|
||||
const skipInitialFetch = core.getBooleanInput('skip_initial_fetch', {
|
||||
required: false
|
||||
})
|
||||
|
||||
const inputs: Inputs = {
|
||||
files,
|
||||
@@ -171,9 +194,7 @@ export const getInputs = (): Inputs => {
|
||||
filesIgnoreYamlFromSourceFile,
|
||||
filesIgnoreYamlFromSourceFileSeparator,
|
||||
separator,
|
||||
includeAllOldNewRenamedFiles,
|
||||
oldNewSeparator,
|
||||
oldNewFilesSeparator,
|
||||
// Not Supported via REST API
|
||||
sha,
|
||||
baseSha,
|
||||
since,
|
||||
@@ -181,17 +202,27 @@ export const getInputs = (): Inputs => {
|
||||
path,
|
||||
quotePath,
|
||||
diffRelative,
|
||||
sinceLastRemoteCommit,
|
||||
recoverDeletedFiles,
|
||||
recoverDeletedFilesToDestination,
|
||||
recoverFiles,
|
||||
recoverFilesSeparator,
|
||||
recoverFilesIgnore,
|
||||
recoverFilesIgnoreSeparator,
|
||||
includeAllOldNewRenamedFiles,
|
||||
oldNewSeparator,
|
||||
oldNewFilesSeparator,
|
||||
// End Not Supported via REST API
|
||||
dirNames,
|
||||
dirNamesExcludeRoot,
|
||||
dirNamesExcludeCurrentDir,
|
||||
json,
|
||||
escapeJson,
|
||||
sinceLastRemoteCommit,
|
||||
writeOutputFiles,
|
||||
outputDir,
|
||||
outputRenamedFilesAsDeletedAndAdded,
|
||||
recoverDeletedFiles,
|
||||
recoverDeletedFilesToDestination
|
||||
token,
|
||||
apiUrl,
|
||||
skipInitialFetch
|
||||
}
|
||||
|
||||
if (fetchDepth) {
|
||||
|
||||
256
src/main.ts
256
src/main.ts
@@ -1,33 +1,95 @@
|
||||
import * as core from '@actions/core'
|
||||
import * as github from '@actions/github'
|
||||
import path from 'path'
|
||||
import {getAllDiffFiles, getRenamedFiles} from './changedFiles'
|
||||
import {
|
||||
ChangedFiles,
|
||||
ChangeTypeEnum,
|
||||
getAllDiffFiles,
|
||||
getChangedFilesFromGithubAPI,
|
||||
getRenamedFiles
|
||||
} from './changedFiles'
|
||||
import {setChangedFilesOutput} from './changedFilesOutput'
|
||||
import {
|
||||
DiffResult,
|
||||
getSHAForPullRequestEvent,
|
||||
getSHAForPushEvent
|
||||
} from './commitSha'
|
||||
import {getEnv} from './env'
|
||||
import {getInputs} from './inputs'
|
||||
import {Env, getEnv} from './env'
|
||||
import {getInputs, Inputs} from './inputs'
|
||||
import {
|
||||
getFilePatterns,
|
||||
getRecoverFilePatterns,
|
||||
getSubmodulePath,
|
||||
getYamlFilePatterns,
|
||||
hasLocalGitDirectory,
|
||||
isRepoShallow,
|
||||
recoverDeletedFiles,
|
||||
setOutput,
|
||||
submoduleExists,
|
||||
updateGitGlobalConfig,
|
||||
verifyMinimumGitVersion
|
||||
} from './utils'
|
||||
|
||||
export async function run(): Promise<void> {
|
||||
core.startGroup('changed-files')
|
||||
const changedFilesOutput = async ({
|
||||
filePatterns,
|
||||
allDiffFiles,
|
||||
inputs,
|
||||
yamlFilePatterns
|
||||
}: {
|
||||
filePatterns: string[]
|
||||
allDiffFiles: ChangedFiles
|
||||
inputs: Inputs
|
||||
yamlFilePatterns: Record<string, string[]>
|
||||
}): Promise<void> => {
|
||||
if (filePatterns.length > 0) {
|
||||
core.startGroup('changed-files-patterns')
|
||||
await setChangedFilesOutput({
|
||||
allDiffFiles,
|
||||
filePatterns,
|
||||
inputs
|
||||
})
|
||||
core.info('All Done!')
|
||||
core.endGroup()
|
||||
}
|
||||
|
||||
const env = await getEnv()
|
||||
core.debug(`Env: ${JSON.stringify(env, null, 2)}`)
|
||||
const inputs = getInputs()
|
||||
core.debug(`Inputs: ${JSON.stringify(inputs, null, 2)}`)
|
||||
if (Object.keys(yamlFilePatterns).length > 0) {
|
||||
for (const key of Object.keys(yamlFilePatterns)) {
|
||||
core.startGroup(`changed-files-yaml-${key}`)
|
||||
await setChangedFilesOutput({
|
||||
allDiffFiles,
|
||||
filePatterns: yamlFilePatterns[key],
|
||||
outputPrefix: key,
|
||||
inputs
|
||||
})
|
||||
core.info('All Done!')
|
||||
core.endGroup()
|
||||
}
|
||||
}
|
||||
|
||||
if (filePatterns.length === 0 && Object.keys(yamlFilePatterns).length === 0) {
|
||||
core.startGroup('changed-files-all')
|
||||
await setChangedFilesOutput({
|
||||
allDiffFiles,
|
||||
inputs
|
||||
})
|
||||
core.info('All Done!')
|
||||
core.endGroup()
|
||||
}
|
||||
}
|
||||
|
||||
const getChangedFilesFromLocalGit = async ({
|
||||
inputs,
|
||||
env,
|
||||
workingDirectory,
|
||||
filePatterns,
|
||||
yamlFilePatterns
|
||||
}: {
|
||||
inputs: Inputs
|
||||
env: Env
|
||||
workingDirectory: string
|
||||
filePatterns: string[]
|
||||
yamlFilePatterns: Record<string, string[]>
|
||||
}): Promise<void> => {
|
||||
await verifyMinimumGitVersion()
|
||||
|
||||
let quotePathValue = 'on'
|
||||
@@ -48,10 +110,6 @@ export async function run(): Promise<void> {
|
||||
})
|
||||
}
|
||||
|
||||
const workingDirectory = path.resolve(
|
||||
env.GITHUB_WORKSPACE || process.cwd(),
|
||||
inputs.path
|
||||
)
|
||||
const isShallow = await isRepoShallow({cwd: workingDirectory})
|
||||
const hasSubmodule = await submoduleExists({cwd: workingDirectory})
|
||||
let gitFetchExtraArgs = ['--no-tags', '--prune', '--recurse-submodules']
|
||||
@@ -70,8 +128,8 @@ export async function run(): Promise<void> {
|
||||
|
||||
let diffResult: DiffResult
|
||||
|
||||
if (!env.GITHUB_EVENT_PULL_REQUEST_BASE_REF) {
|
||||
core.info(`Running on a ${env.GITHUB_EVENT_NAME || 'push'} event...`)
|
||||
if (!github.context.payload.pull_request?.base?.ref) {
|
||||
core.info(`Running on a ${github.context.eventName || 'push'} event...`)
|
||||
diffResult = await getSHAForPushEvent(
|
||||
inputs,
|
||||
env,
|
||||
@@ -83,8 +141,8 @@ export async function run(): Promise<void> {
|
||||
)
|
||||
} else {
|
||||
core.info(
|
||||
`Running on a ${env.GITHUB_EVENT_NAME || 'pull_request'} (${
|
||||
env.GITHUB_EVENT_ACTION
|
||||
`Running on a ${github.context.eventName || 'pull_request'} (${
|
||||
github.context.payload.action
|
||||
}) event...`
|
||||
)
|
||||
diffResult = await getSHAForPullRequestEvent(
|
||||
@@ -118,59 +176,30 @@ export async function run(): Promise<void> {
|
||||
core.info('All Done!')
|
||||
core.endGroup()
|
||||
|
||||
const filePatterns = await getFilePatterns({
|
||||
inputs,
|
||||
workingDirectory
|
||||
})
|
||||
core.debug(`File patterns: ${filePatterns}`)
|
||||
if (inputs.recoverDeletedFiles) {
|
||||
let recoverPatterns = getRecoverFilePatterns({inputs})
|
||||
|
||||
if (filePatterns.length > 0) {
|
||||
core.startGroup('changed-files-patterns')
|
||||
await setChangedFilesOutput({
|
||||
allDiffFiles,
|
||||
filePatterns,
|
||||
inputs,
|
||||
workingDirectory,
|
||||
diffResult
|
||||
})
|
||||
core.info('All Done!')
|
||||
core.endGroup()
|
||||
}
|
||||
|
||||
const yamlFilePatterns = await getYamlFilePatterns({
|
||||
inputs,
|
||||
workingDirectory
|
||||
})
|
||||
core.debug(`Yaml file patterns: ${JSON.stringify(yamlFilePatterns)}`)
|
||||
|
||||
if (Object.keys(yamlFilePatterns).length > 0) {
|
||||
for (const key of Object.keys(yamlFilePatterns)) {
|
||||
core.startGroup(`changed-files-yaml-${key}`)
|
||||
await setChangedFilesOutput({
|
||||
allDiffFiles,
|
||||
filePatterns: yamlFilePatterns[key],
|
||||
outputPrefix: key,
|
||||
inputs,
|
||||
workingDirectory,
|
||||
diffResult
|
||||
})
|
||||
core.info('All Done!')
|
||||
core.endGroup()
|
||||
if (recoverPatterns.length > 0 && filePatterns.length > 0) {
|
||||
core.info('No recover patterns found; defaulting to file patterns')
|
||||
recoverPatterns = filePatterns
|
||||
}
|
||||
}
|
||||
|
||||
if (filePatterns.length === 0 && Object.keys(yamlFilePatterns).length === 0) {
|
||||
core.startGroup('changed-files-all')
|
||||
await setChangedFilesOutput({
|
||||
allDiffFiles,
|
||||
await recoverDeletedFiles({
|
||||
inputs,
|
||||
workingDirectory,
|
||||
diffResult
|
||||
deletedFiles: allDiffFiles[ChangeTypeEnum.Deleted],
|
||||
recoverPatterns,
|
||||
sha: diffResult.previousSha
|
||||
})
|
||||
core.info('All Done!')
|
||||
core.endGroup()
|
||||
}
|
||||
|
||||
await changedFilesOutput({
|
||||
filePatterns,
|
||||
allDiffFiles,
|
||||
inputs,
|
||||
yamlFilePatterns
|
||||
})
|
||||
|
||||
if (inputs.includeAllOldNewRenamedFiles) {
|
||||
core.startGroup('changed-files-all-old-new-renamed-files')
|
||||
const allOldNewRenamedFiles = await getRenamedFiles({
|
||||
@@ -196,6 +225,109 @@ export async function run(): Promise<void> {
|
||||
}
|
||||
}
|
||||
|
||||
const getChangedFilesFromRESTAPI = async ({
|
||||
inputs,
|
||||
filePatterns,
|
||||
yamlFilePatterns
|
||||
}: {
|
||||
inputs: Inputs
|
||||
filePatterns: string[]
|
||||
yamlFilePatterns: Record<string, string[]>
|
||||
}): Promise<void> => {
|
||||
const allDiffFiles = await getChangedFilesFromGithubAPI({
|
||||
inputs
|
||||
})
|
||||
core.debug(`All diff files: ${JSON.stringify(allDiffFiles)}`)
|
||||
core.info('All Done!')
|
||||
|
||||
await changedFilesOutput({
|
||||
filePatterns,
|
||||
allDiffFiles,
|
||||
inputs,
|
||||
yamlFilePatterns
|
||||
})
|
||||
}
|
||||
|
||||
export async function run(): Promise<void> {
|
||||
core.startGroup('changed-files')
|
||||
|
||||
const env = await getEnv()
|
||||
core.debug(`Env: ${JSON.stringify(env, null, 2)}`)
|
||||
|
||||
const inputs = getInputs()
|
||||
core.debug(`Inputs: ${JSON.stringify(inputs, null, 2)}`)
|
||||
|
||||
core.debug(`Github Context: ${JSON.stringify(github.context, null, 2)}`)
|
||||
|
||||
const workingDirectory = path.resolve(
|
||||
env.GITHUB_WORKSPACE || process.cwd(),
|
||||
inputs.path
|
||||
)
|
||||
core.debug(`Working directory: ${workingDirectory}`)
|
||||
|
||||
const hasGitDirectory = await hasLocalGitDirectory({workingDirectory})
|
||||
core.debug(`Has git directory: ${hasGitDirectory}`)
|
||||
|
||||
const filePatterns = await getFilePatterns({
|
||||
inputs,
|
||||
workingDirectory
|
||||
})
|
||||
core.debug(`File patterns: ${filePatterns}`)
|
||||
|
||||
const yamlFilePatterns = await getYamlFilePatterns({
|
||||
inputs,
|
||||
workingDirectory
|
||||
})
|
||||
core.debug(`Yaml file patterns: ${JSON.stringify(yamlFilePatterns)}`)
|
||||
|
||||
if (
|
||||
inputs.token &&
|
||||
github.context.payload.pull_request?.number &&
|
||||
!hasGitDirectory
|
||||
) {
|
||||
core.info("Using GitHub's REST API to get changed files")
|
||||
const unsupportedInputs: (keyof Inputs)[] = [
|
||||
'sha',
|
||||
'baseSha',
|
||||
'since',
|
||||
'until',
|
||||
'sinceLastRemoteCommit',
|
||||
'recoverDeletedFiles',
|
||||
'recoverDeletedFilesToDestination',
|
||||
'includeAllOldNewRenamedFiles'
|
||||
]
|
||||
|
||||
for (const input of unsupportedInputs) {
|
||||
if (inputs[input]) {
|
||||
core.warning(
|
||||
`Input "${input}" is not supported when using GitHub's REST API to get changed files`
|
||||
)
|
||||
}
|
||||
}
|
||||
await getChangedFilesFromRESTAPI({
|
||||
inputs,
|
||||
filePatterns,
|
||||
yamlFilePatterns
|
||||
})
|
||||
} else {
|
||||
if (!hasGitDirectory) {
|
||||
core.setFailed(
|
||||
"Can't find local .git directory. Please run actions/checkout before this action"
|
||||
)
|
||||
return
|
||||
}
|
||||
|
||||
core.info('Using local .git directory')
|
||||
await getChangedFilesFromLocalGit({
|
||||
inputs,
|
||||
env,
|
||||
workingDirectory,
|
||||
filePatterns,
|
||||
yamlFilePatterns
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
/* istanbul ignore if */
|
||||
if (!process.env.TESTING) {
|
||||
// eslint-disable-next-line github/no-then
|
||||
|
||||
153
src/utils.ts
153
src/utils.ts
@@ -97,7 +97,7 @@ export const verifyMinimumGitVersion = async (): Promise<void> => {
|
||||
const {exitCode, stdout, stderr} = await exec.getExecOutput(
|
||||
'git',
|
||||
['--version'],
|
||||
{silent: process.env.RUNNER_DEBUG !== '1'}
|
||||
{silent: !core.isDebug()}
|
||||
)
|
||||
|
||||
if (exitCode !== 0) {
|
||||
@@ -181,7 +181,7 @@ export const updateGitGlobalConfig = async ({
|
||||
['config', '--global', name, value],
|
||||
{
|
||||
ignoreReturnCode: true,
|
||||
silent: process.env.RUNNER_DEBUG !== '1'
|
||||
silent: !core.isDebug()
|
||||
}
|
||||
)
|
||||
|
||||
@@ -197,7 +197,7 @@ export const isRepoShallow = async ({cwd}: {cwd: string}): Promise<boolean> => {
|
||||
['rev-parse', '--is-shallow-repository'],
|
||||
{
|
||||
cwd,
|
||||
silent: process.env.RUNNER_DEBUG !== '1'
|
||||
silent: !core.isDebug()
|
||||
}
|
||||
)
|
||||
|
||||
@@ -209,17 +209,18 @@ export const submoduleExists = async ({
|
||||
}: {
|
||||
cwd: string
|
||||
}): Promise<boolean> => {
|
||||
const {stdout, exitCode} = await exec.getExecOutput(
|
||||
const {stdout, exitCode, stderr} = await exec.getExecOutput(
|
||||
'git',
|
||||
['submodule', 'status'],
|
||||
{
|
||||
cwd,
|
||||
ignoreReturnCode: true,
|
||||
silent: process.env.RUNNER_DEBUG !== '1'
|
||||
silent: !core.isDebug()
|
||||
}
|
||||
)
|
||||
|
||||
if (exitCode !== 0) {
|
||||
core.warning(stderr || "Couldn't list submodules")
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -236,7 +237,7 @@ export const gitFetch = async ({
|
||||
const {exitCode} = await exec.getExecOutput('git', ['fetch', '-q', ...args], {
|
||||
cwd,
|
||||
ignoreReturnCode: true,
|
||||
silent: process.env.RUNNER_DEBUG !== '1'
|
||||
silent: !core.isDebug()
|
||||
})
|
||||
|
||||
return exitCode
|
||||
@@ -255,7 +256,7 @@ export const gitFetchSubmodules = async ({
|
||||
{
|
||||
cwd,
|
||||
ignoreReturnCode: true,
|
||||
silent: process.env.RUNNER_DEBUG !== '1'
|
||||
silent: !core.isDebug()
|
||||
}
|
||||
)
|
||||
|
||||
@@ -280,7 +281,7 @@ export const getSubmodulePath = async ({
|
||||
{
|
||||
cwd,
|
||||
ignoreReturnCode: true,
|
||||
silent: process.env.RUNNER_DEBUG !== '1'
|
||||
silent: !core.isDebug()
|
||||
}
|
||||
)
|
||||
|
||||
@@ -292,7 +293,7 @@ export const getSubmodulePath = async ({
|
||||
return stdout
|
||||
.trim()
|
||||
.split('\n')
|
||||
.map((line: string) => normalizePath(line.split(' ')[1]))
|
||||
.map((line: string) => normalizePath(line.trim().split(' ')[1]))
|
||||
}
|
||||
|
||||
export const gitSubmoduleDiffSHA = async ({
|
||||
@@ -313,7 +314,7 @@ export const gitSubmoduleDiffSHA = async ({
|
||||
['diff', parentSha1, parentSha2, '--', submodulePath],
|
||||
{
|
||||
cwd,
|
||||
silent: process.env.RUNNER_DEBUG !== '1'
|
||||
silent: !core.isDebug()
|
||||
}
|
||||
)
|
||||
|
||||
@@ -366,7 +367,7 @@ export const gitRenamedFiles = async ({
|
||||
{
|
||||
cwd,
|
||||
ignoreReturnCode: true,
|
||||
silent: process.env.RUNNER_DEBUG !== '1'
|
||||
silent: !core.isDebug()
|
||||
}
|
||||
)
|
||||
|
||||
@@ -436,7 +437,7 @@ export const getAllChangedFiles = async ({
|
||||
{
|
||||
cwd,
|
||||
ignoreReturnCode: true,
|
||||
silent: process.env.RUNNER_DEBUG !== '1'
|
||||
silent: !core.isDebug()
|
||||
}
|
||||
)
|
||||
const changedFiles: ChangedFiles = {
|
||||
@@ -537,7 +538,7 @@ export const gitLog = async ({
|
||||
}): Promise<string> => {
|
||||
const {stdout} = await exec.getExecOutput('git', ['log', ...args], {
|
||||
cwd,
|
||||
silent: process.env.RUNNER_DEBUG !== '1'
|
||||
silent: !core.isDebug()
|
||||
})
|
||||
|
||||
return stdout.trim()
|
||||
@@ -546,12 +547,30 @@ export const gitLog = async ({
|
||||
export const getHeadSha = async ({cwd}: {cwd: string}): Promise<string> => {
|
||||
const {stdout} = await exec.getExecOutput('git', ['rev-parse', 'HEAD'], {
|
||||
cwd,
|
||||
silent: process.env.RUNNER_DEBUG !== '1'
|
||||
silent: !core.isDebug()
|
||||
})
|
||||
|
||||
return stdout.trim()
|
||||
}
|
||||
|
||||
export const isInsideWorkTree = async ({
|
||||
cwd
|
||||
}: {
|
||||
cwd: string
|
||||
}): Promise<boolean> => {
|
||||
const {stdout} = await exec.getExecOutput(
|
||||
'git',
|
||||
['rev-parse', '--is-inside-work-tree'],
|
||||
{
|
||||
cwd,
|
||||
ignoreReturnCode: true,
|
||||
silent: !core.isDebug()
|
||||
}
|
||||
)
|
||||
|
||||
return stdout.trim() === 'true'
|
||||
}
|
||||
|
||||
export const getRemoteBranchHeadSha = async ({
|
||||
cwd,
|
||||
branch
|
||||
@@ -564,7 +583,7 @@ export const getRemoteBranchHeadSha = async ({
|
||||
['rev-parse', `origin/${branch}`],
|
||||
{
|
||||
cwd,
|
||||
silent: process.env.RUNNER_DEBUG !== '1'
|
||||
silent: !core.isDebug()
|
||||
}
|
||||
)
|
||||
|
||||
@@ -578,7 +597,7 @@ export const getParentSha = async ({cwd}: {cwd: string}): Promise<string> => {
|
||||
{
|
||||
cwd,
|
||||
ignoreReturnCode: true,
|
||||
silent: process.env.RUNNER_DEBUG !== '1'
|
||||
silent: !core.isDebug()
|
||||
}
|
||||
)
|
||||
|
||||
@@ -604,7 +623,7 @@ export const verifyCommitSha = async ({
|
||||
{
|
||||
cwd,
|
||||
ignoreReturnCode: true,
|
||||
silent: process.env.RUNNER_DEBUG !== '1'
|
||||
silent: !core.isDebug()
|
||||
}
|
||||
)
|
||||
|
||||
@@ -634,7 +653,7 @@ export const getPreviousGitTag = async ({
|
||||
['tag', '--sort=-version:refname'],
|
||||
{
|
||||
cwd,
|
||||
silent: process.env.RUNNER_DEBUG !== '1'
|
||||
silent: !core.isDebug()
|
||||
}
|
||||
)
|
||||
|
||||
@@ -652,7 +671,7 @@ export const getPreviousGitTag = async ({
|
||||
['rev-parse', previousTag],
|
||||
{
|
||||
cwd,
|
||||
silent: process.env.RUNNER_DEBUG !== '1'
|
||||
silent: !core.isDebug()
|
||||
}
|
||||
)
|
||||
|
||||
@@ -678,7 +697,7 @@ export const canDiffCommits = async ({
|
||||
{
|
||||
cwd,
|
||||
ignoreReturnCode: true,
|
||||
silent: process.env.RUNNER_DEBUG !== '1'
|
||||
silent: !core.isDebug()
|
||||
}
|
||||
)
|
||||
|
||||
@@ -1009,6 +1028,36 @@ export const getYamlFilePatterns = async ({
|
||||
return filePatterns
|
||||
}
|
||||
|
||||
export const getRecoverFilePatterns = ({
|
||||
inputs
|
||||
}: {
|
||||
inputs: Inputs
|
||||
}): string[] => {
|
||||
let filePatterns: string[] = inputs.recoverFiles.split(
|
||||
inputs.recoverFilesSeparator
|
||||
)
|
||||
|
||||
if (inputs.recoverFilesIgnore) {
|
||||
const ignoreFilePatterns = inputs.recoverFilesIgnore.split(
|
||||
inputs.recoverFilesSeparator
|
||||
)
|
||||
|
||||
filePatterns = filePatterns.concat(
|
||||
ignoreFilePatterns.map(p => {
|
||||
if (p.startsWith('!')) {
|
||||
return p
|
||||
} else {
|
||||
return `!${p}`
|
||||
}
|
||||
})
|
||||
)
|
||||
}
|
||||
|
||||
core.debug(`recover file patterns: ${filePatterns}`)
|
||||
|
||||
return filePatterns.filter(Boolean)
|
||||
}
|
||||
|
||||
export const setOutput = async ({
|
||||
key,
|
||||
value,
|
||||
@@ -1047,7 +1096,7 @@ const getDeletedFileContents = async ({
|
||||
['show', `${sha}:${filePath}`],
|
||||
{
|
||||
cwd,
|
||||
silent: process.env.RUNNER_DEBUG !== '1',
|
||||
silent: !core.isDebug(),
|
||||
ignoreReturnCode: true
|
||||
}
|
||||
)
|
||||
@@ -1065,35 +1114,59 @@ export const recoverDeletedFiles = async ({
|
||||
inputs,
|
||||
workingDirectory,
|
||||
deletedFiles,
|
||||
recoverPatterns,
|
||||
sha
|
||||
}: {
|
||||
inputs: Inputs
|
||||
workingDirectory: string
|
||||
deletedFiles: string[]
|
||||
recoverPatterns: string[]
|
||||
sha: string
|
||||
}): Promise<void> => {
|
||||
if (inputs.recoverDeletedFiles) {
|
||||
for (const deletedFile of deletedFiles) {
|
||||
let target = path.join(workingDirectory, deletedFile)
|
||||
let recoverableDeletedFiles = deletedFiles
|
||||
core.debug(`recoverable deleted files: ${recoverableDeletedFiles}`)
|
||||
|
||||
if (inputs.recoverDeletedFilesToDestination) {
|
||||
target = path.join(
|
||||
workingDirectory,
|
||||
inputs.recoverDeletedFilesToDestination,
|
||||
deletedFile
|
||||
)
|
||||
}
|
||||
if (recoverPatterns.length > 0) {
|
||||
recoverableDeletedFiles = mm(deletedFiles, recoverPatterns, {
|
||||
dot: true,
|
||||
windows: IS_WINDOWS,
|
||||
noext: true
|
||||
})
|
||||
core.debug(`filtered recoverable deleted files: ${recoverableDeletedFiles}`)
|
||||
}
|
||||
|
||||
const deletedFileContents = await getDeletedFileContents({
|
||||
cwd: workingDirectory,
|
||||
filePath: deletedFile,
|
||||
sha
|
||||
})
|
||||
for (const deletedFile of recoverableDeletedFiles) {
|
||||
let target = path.join(workingDirectory, deletedFile)
|
||||
|
||||
if (!(await exists(path.dirname(target)))) {
|
||||
await fs.mkdir(path.dirname(target), {recursive: true})
|
||||
}
|
||||
await fs.writeFile(target, deletedFileContents)
|
||||
if (inputs.recoverDeletedFilesToDestination) {
|
||||
target = path.join(
|
||||
workingDirectory,
|
||||
inputs.recoverDeletedFilesToDestination,
|
||||
deletedFile
|
||||
)
|
||||
}
|
||||
|
||||
const deletedFileContents = await getDeletedFileContents({
|
||||
cwd: workingDirectory,
|
||||
filePath: deletedFile,
|
||||
sha
|
||||
})
|
||||
|
||||
if (!(await exists(path.dirname(target)))) {
|
||||
await fs.mkdir(path.dirname(target), {recursive: true})
|
||||
}
|
||||
await fs.writeFile(target, deletedFileContents)
|
||||
}
|
||||
}
|
||||
|
||||
export const hasLocalGitDirectory = async ({
|
||||
workingDirectory
|
||||
}: {
|
||||
workingDirectory: string
|
||||
}): Promise<boolean> => {
|
||||
const insideWorkTree = await isInsideWorkTree({
|
||||
cwd: workingDirectory
|
||||
})
|
||||
|
||||
return insideWorkTree
|
||||
}
|
||||
|
||||
Submodule test/demo updated: 83ccca9b63...e168fac86c
Reference in New Issue
Block a user