Compare commits
59 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2f7246cb26 | ||
|
|
8476756ae3 | ||
|
|
d90c240f2a | ||
|
|
3be651e99d | ||
|
|
4fac98a656 | ||
|
|
bed56b29b8 | ||
|
|
2338e28eef | ||
|
|
d4eb53db66 | ||
|
|
8f777bbc0d | ||
|
|
7d256b941a | ||
|
|
c3ceccf9bc | ||
|
|
c89928824f | ||
|
|
047f654646 | ||
|
|
0fc9663aa7 | ||
|
|
50f623482f | ||
|
|
2e0f79f8b6 | ||
|
|
308cb3daf9 | ||
|
|
f1b3c2fa8b | ||
|
|
2f6d66af9d | ||
|
|
ef21b84507 | ||
|
|
c9dd6721cf | ||
|
|
428519788b | ||
|
|
522df62704 | ||
|
|
d35b677f4b | ||
|
|
b1c183b83c | ||
|
|
7555f14f91 | ||
|
|
bc2a793022 | ||
|
|
a40e52b504 | ||
|
|
c860b5c47f | ||
|
|
2f8b80270f | ||
|
|
d01e38ae60 | ||
|
|
eed6844f8b | ||
|
|
f6e73eb5b6 | ||
|
|
3034ed7851 | ||
|
|
34c9fcc96a | ||
|
|
b7f1b7347f | ||
|
|
fc4a224c47 | ||
|
|
b86b5055c6 | ||
|
|
c0d418d2f4 | ||
|
|
2cd89433de | ||
|
|
6cb2857ef0 | ||
|
|
716bc48e21 | ||
|
|
6afd248b18 | ||
|
|
8e62bee92f | ||
|
|
02ce009f42 | ||
|
|
88a8df65a2 | ||
|
|
5c42e98b8f | ||
|
|
fd5abe1ac5 | ||
|
|
088d89c918 | ||
|
|
8299ae07ec | ||
|
|
fd8ad0b934 | ||
|
|
2fc6aa80df | ||
|
|
1c26215f3f | ||
|
|
7b1e1540e2 | ||
|
|
02010edac3 | ||
|
|
e4e76943d6 | ||
|
|
569361586a | ||
|
|
785218258b | ||
|
|
0b45bc64c2 |
12
.github/FUNDING.yml
vendored
12
.github/FUNDING.yml
vendored
@@ -1,12 +0,0 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: jackton1
|
||||
patreon: # Replace with a single Patreon username
|
||||
open_collective: tj-actions
|
||||
ko_fi: # Replace with a single Ko-fi username
|
||||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
liberapay: # Replace with a single Liberapay username
|
||||
issuehunt: # Replace with a single IssueHunt username
|
||||
otechie: # Replace with a single Otechie username
|
||||
custom: []
|
||||
98
.github/ISSUE_TEMPLATE/bug_report.yaml
vendored
98
.github/ISSUE_TEMPLATE/bug_report.yaml
vendored
@@ -1,98 +0,0 @@
|
||||
name: 🐞 Bug
|
||||
description: Create a report to help us improve
|
||||
title: "[BUG] <title>"
|
||||
labels: [bug, needs triage]
|
||||
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thanks for taking the time to fill out this bug report!
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Is there an existing issue for this?
|
||||
description: Please search to see if an issue already exists for the bug you encountered.
|
||||
options:
|
||||
- label: I have searched the existing issues
|
||||
required: true
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Does this issue exist in the latest version?
|
||||
description: Please view all releases to confirm that this issue hasn't already been fixed.
|
||||
options:
|
||||
- label: I'm using the latest release
|
||||
required: true
|
||||
- type: textarea
|
||||
id: what-happened
|
||||
attributes:
|
||||
label: Describe the bug?
|
||||
description: A clear and concise description of what the bug is
|
||||
placeholder: Tell us what you see!
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: reproduce
|
||||
attributes:
|
||||
label: To Reproduce
|
||||
description: Steps to reproduce the behavior?
|
||||
placeholder: |
|
||||
1. In this environment...
|
||||
2. With this config...
|
||||
3. Run '...'
|
||||
4. See error...
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
id: os
|
||||
attributes:
|
||||
label: What OS are you seeing the problem on?
|
||||
multiple: true
|
||||
options:
|
||||
- all
|
||||
- ubuntu-latest or ubuntu-20.04
|
||||
- ubuntu-18.04
|
||||
- macos-latest or macos-10.15
|
||||
- macos-11
|
||||
- windows-latest or windows-2019
|
||||
- windows-2016
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: expected
|
||||
attributes:
|
||||
label: Expected behavior?
|
||||
description: A clear and concise description of what you expected to happen.
|
||||
placeholder: Tell us what you expected!
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: logs
|
||||
attributes:
|
||||
label: Relevant log output
|
||||
description: Please copy and paste any relevant log output which is obtained after enabling debug logging. This will be automatically formatted into code, so no need for backticks.
|
||||
placeholder: |
|
||||
1. Re-running the workflow with debug logging enabled.
|
||||
2. Copy or download the log archive.
|
||||
3. Paste the contents here or upload the file in a subsequent comment.
|
||||
render: shell
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Anything else?
|
||||
description: |
|
||||
Links? or References?
|
||||
|
||||
Anything that will give us more context about the issue you are encountering!
|
||||
|
||||
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
|
||||
validations:
|
||||
required: false
|
||||
- type: checkboxes
|
||||
id: terms
|
||||
attributes:
|
||||
label: Code of Conduct
|
||||
description: By submitting this issue, you agree to follow our [Code of Conduct](../blob/main/CODE_OF_CONDUCT.md)
|
||||
options:
|
||||
- label: I agree to follow this project's Code of Conduct
|
||||
required: true
|
||||
59
.github/ISSUE_TEMPLATE/feature_request.yaml
vendored
59
.github/ISSUE_TEMPLATE/feature_request.yaml
vendored
@@ -1,59 +0,0 @@
|
||||
name: Feature request
|
||||
description: Suggest an idea for this project
|
||||
title: "[Feature] <title>"
|
||||
labels: [enhancement]
|
||||
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thanks for taking the time to fill out this feature request!
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Is this feature missing in the latest version?
|
||||
description: Please upgrade to the latest version to verify that this feature is still missing.
|
||||
options:
|
||||
- label: I'm using the latest release
|
||||
required: true
|
||||
- type: textarea
|
||||
id: what-happened
|
||||
attributes:
|
||||
label: Is your feature request related to a problem? Please describe.
|
||||
description: |
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
placeholder: Tell us what you see!
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: requests
|
||||
attributes:
|
||||
label: Describe the solution you'd like?
|
||||
description: A clear and concise description of what you want to happen.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: alternative
|
||||
attributes:
|
||||
label: Describe alternatives you've considered?
|
||||
description: A clear and concise description of any alternative solutions or features you've considered.
|
||||
validations:
|
||||
required: false
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Anything else?
|
||||
description: |
|
||||
Links? or References?
|
||||
|
||||
Add any other context or screenshots about the feature request here.
|
||||
|
||||
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
|
||||
validations:
|
||||
required: false
|
||||
- type: checkboxes
|
||||
id: terms
|
||||
attributes:
|
||||
label: Code of Conduct
|
||||
description: By submitting this issue, you agree to follow our [Code of Conduct](../blob/main/CODE_OF_CONDUCT.md)
|
||||
options:
|
||||
- label: I agree to follow this project's Code of Conduct
|
||||
required: true
|
||||
7
.github/dependabot.yml
vendored
7
.github/dependabot.yml
vendored
@@ -15,3 +15,10 @@ updates:
|
||||
open-pull-requests-limit: 10
|
||||
labels:
|
||||
- "merge when passing"
|
||||
- package-ecosystem: gitsubmodule
|
||||
directory: /
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
labels:
|
||||
- "merge when passing"
|
||||
|
||||
29
.github/workflows/submodule-sync.yml
vendored
29
.github/workflows/submodule-sync.yml
vendored
@@ -1,29 +0,0 @@
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
sync:
|
||||
name: Submodule Sync
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: recursive
|
||||
|
||||
- name: Git Sumbodule Update
|
||||
run: |
|
||||
git pull --recurse-submodules
|
||||
git submodule update --remote --recursive
|
||||
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@v5.0.2
|
||||
with:
|
||||
title: "Updated submodule"
|
||||
labels: "merge when passing"
|
||||
branch: "chore/update-submodule"
|
||||
commit-message: "Updated submodule"
|
||||
body: "Updated submodule"
|
||||
token: ${{ secrets.PAT_TOKEN }}
|
||||
2
.github/workflows/sync-release-version.yml
vendored
2
.github/workflows/sync-release-version.yml
vendored
@@ -12,7 +12,7 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Run release-tagger
|
||||
uses: tj-actions/release-tagger@v3
|
||||
uses: tj-actions/release-tagger@v4
|
||||
- name: Sync release version.
|
||||
uses: tj-actions/sync-release-version@v13
|
||||
id: sync-release-version
|
||||
|
||||
1
.github/workflows/test.yml
vendored
1
.github/workflows/test.yml
vendored
@@ -82,7 +82,6 @@ jobs:
|
||||
- name: Verify Changed files
|
||||
uses: tj-actions/verify-changed-files@v16
|
||||
id: changed_files
|
||||
if: github.event_name == 'pull_request'
|
||||
with:
|
||||
files: |
|
||||
src
|
||||
|
||||
2
.github/workflows/update-readme.yml
vendored
2
.github/workflows/update-readme.yml
vendored
@@ -14,7 +14,7 @@ jobs:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Run auto-doc
|
||||
uses: tj-actions/auto-doc@v2
|
||||
uses: tj-actions/auto-doc@v3
|
||||
|
||||
- name: Run remark
|
||||
uses: tj-actions/remark@v3
|
||||
|
||||
173
HISTORY.md
173
HISTORY.md
@@ -1,5 +1,178 @@
|
||||
# Changelog
|
||||
|
||||
# [38.2.0](https://github.com/tj-actions/changed-files/compare/v38.1.3...v38.2.0) - (2023-08-30)
|
||||
|
||||
## <!-- 0 -->🚀 Features
|
||||
|
||||
- Add support for failing on error ([#1511](https://github.com/tj-actions/changed-files/issues/1511)) ([f1b3c2f](https://github.com/tj-actions/changed-files/commit/f1b3c2fa8b5692e972e331fdd79882d38273972c)) - (Tonye Jack)
|
||||
|
||||
## <!-- 1 -->🐛 Bug Fixes
|
||||
|
||||
- **deps:** Update dependency yaml to v2.3.2 ([7555f14](https://github.com/tj-actions/changed-files/commit/7555f14f918691d9063483ad675c79b69b47adcd)) - (renovate[bot])
|
||||
|
||||
## <!-- 16 -->➕ Add
|
||||
|
||||
- Added missing changes and modified dist assets.
|
||||
([b1c183b](https://github.com/tj-actions/changed-files/commit/b1c183b83c74c3f32fb9bb133284a41b10553736)) - (GitHub Action)
|
||||
|
||||
## <!-- 26 -->🔄 Update
|
||||
|
||||
- Updated README.md ([#1514](https://github.com/tj-actions/changed-files/issues/1514))
|
||||
|
||||
Co-authored-by: jackton1 <jackton1@users.noreply.github.com> ([50f6234](https://github.com/tj-actions/changed-files/commit/50f623482f13ff783ea3495d9c9a106d8f17d2ff)) - (tj-actions[bot])
|
||||
- Update README.md ([2e0f79f](https://github.com/tj-actions/changed-files/commit/2e0f79f8b6a541bee4a978276043a311172d0dc2)) - (Tonye Jack)
|
||||
- Updated README.md ([#1513](https://github.com/tj-actions/changed-files/issues/1513))
|
||||
|
||||
Co-authored-by: jackton1 <jackton1@users.noreply.github.com> ([308cb3d](https://github.com/tj-actions/changed-files/commit/308cb3daf981b614d1eb8f01ba365f9d478fb50d)) - (tj-actions[bot])
|
||||
- Updated README.md ([#1510](https://github.com/tj-actions/changed-files/issues/1510))
|
||||
|
||||
Co-authored-by: jackton1 <jackton1@users.noreply.github.com> ([2f6d66a](https://github.com/tj-actions/changed-files/commit/2f6d66af9db64309ccb993e5969f61d180c9d5ff)) - (tj-actions[bot])
|
||||
- Update README.md ([ef21b84](https://github.com/tj-actions/changed-files/commit/ef21b845077a6a12523c59bee84fab2847a3c6ed)) - (Tonye Jack)
|
||||
- Update README.md ([c9dd672](https://github.com/tj-actions/changed-files/commit/c9dd6721cf288da7c7c5d06f78cb27e66d7d8279)) - (Tonye Jack)
|
||||
|
||||
## <!-- 7 -->⚙️ Miscellaneous Tasks
|
||||
|
||||
- **deps:** Update dependency @types/uuid to v9.0.3 ([#1512](https://github.com/tj-actions/changed-files/issues/1512)) ([0fc9663](https://github.com/tj-actions/changed-files/commit/0fc9663aa70243d87319dbd32fd926344d18d38f)) - (renovate[bot])
|
||||
- **deps:** Update dependency prettier to v3.0.3 ([4285197](https://github.com/tj-actions/changed-files/commit/428519788bc9daeb52f4031e6be46b6a8b42d57a)) - (renovate[bot])
|
||||
- **deps:** Update dependency eslint-plugin-github to v4.10.0 ([522df62](https://github.com/tj-actions/changed-files/commit/522df62704d7d3a82510f5b1af9bcac3e8c95a60)) - (renovate[bot])
|
||||
- **deps:** Update typescript-eslint monorepo to v6.5.0 ([d35b677](https://github.com/tj-actions/changed-files/commit/d35b677f4bef732191226506c4e785f7dfea2cd0)) - (renovate[bot])
|
||||
- **deps:** Lock file maintenance ([bc2a793](https://github.com/tj-actions/changed-files/commit/bc2a7930225604ad9877b568ec5bb044d0b1f59c)) - (renovate[bot])
|
||||
|
||||
## <!-- 9 -->⬆️ Upgrades
|
||||
|
||||
- Upgraded to v38.1.3 ([#1503](https://github.com/tj-actions/changed-files/issues/1503))
|
||||
|
||||
Co-authored-by: jackton1 <jackton1@users.noreply.github.com> ([a40e52b](https://github.com/tj-actions/changed-files/commit/a40e52b504ccee766d2304f1b5ff1aeba55a832e)) - (tj-actions[bot])
|
||||
|
||||
# [38.1.3](https://github.com/tj-actions/changed-files/compare/v38.1.2...v38.1.3) - (2023-08-26)
|
||||
|
||||
## <!-- 7 -->⚙️ Miscellaneous Tasks
|
||||
|
||||
- **deps:** Update tj-actions/release-tagger action to v4 ([#1502](https://github.com/tj-actions/changed-files/issues/1502)) ([c860b5c](https://github.com/tj-actions/changed-files/commit/c860b5c47fa71f461da850094ef2f6e3d6514e44)) - (renovate[bot])
|
||||
|
||||
# [38.1.2](https://github.com/tj-actions/changed-files/compare/v38.1.1...v38.1.2) - (2023-08-26)
|
||||
|
||||
## <!-- 7 -->⚙️ Miscellaneous Tasks
|
||||
|
||||
- Update warning message ([#1500](https://github.com/tj-actions/changed-files/issues/1500)) ([2f8b802](https://github.com/tj-actions/changed-files/commit/2f8b80270f04e421b28efb2abaccef4fce4815b6)) - (Tonye Jack)
|
||||
- **deps:** Lock file maintenance ([d01e38a](https://github.com/tj-actions/changed-files/commit/d01e38ae60f5527562be5c2d2bee11d666a25759)) - (renovate[bot])
|
||||
- Update submodule ([#1498](https://github.com/tj-actions/changed-files/issues/1498)) ([eed6844](https://github.com/tj-actions/changed-files/commit/eed6844f8b8930b86537b173c0c545d73fdf2177)) - (Tonye Jack)
|
||||
- Update warning message ([#1497](https://github.com/tj-actions/changed-files/issues/1497)) ([f6e73eb](https://github.com/tj-actions/changed-files/commit/f6e73eb5b610c261657b2de25ec64c4252069608)) - (Tonye Jack)
|
||||
- **deps:** Update dependency eslint to v8.48.0 ([34c9fcc](https://github.com/tj-actions/changed-files/commit/34c9fcc96ac0a5d0be0519ed91e3f625c9b8ad09)) - (renovate[bot])
|
||||
|
||||
## <!-- 9 -->⬆️ Upgrades
|
||||
|
||||
- Upgraded to v38.1.1 ([#1495](https://github.com/tj-actions/changed-files/issues/1495))
|
||||
|
||||
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
|
||||
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com> ([3034ed7](https://github.com/tj-actions/changed-files/commit/3034ed7851a1bae2de6ae8f20e9c9890917b859a)) - (tj-actions[bot])
|
||||
|
||||
# [38.1.1](https://github.com/tj-actions/changed-files/compare/v38.1.0...v38.1.1) - (2023-08-25)
|
||||
|
||||
## <!-- 16 -->➕ Add
|
||||
|
||||
- Added missing changes and modified dist assets.
|
||||
([c0d418d](https://github.com/tj-actions/changed-files/commit/c0d418d2f41e21e92203a1022c4606ef77aa6bc2)) - (GitHub Action)
|
||||
|
||||
## <!-- 26 -->🔄 Update
|
||||
|
||||
- Updated README.md ([#1493](https://github.com/tj-actions/changed-files/issues/1493))
|
||||
|
||||
Co-authored-by: jackton1 <jackton1@users.noreply.github.com> ([b7f1b73](https://github.com/tj-actions/changed-files/commit/b7f1b7347fea1df67230801b66081fe3cba7dc69)) - (tj-actions[bot])
|
||||
- Update README.md ([fc4a224](https://github.com/tj-actions/changed-files/commit/fc4a224c47dadefa07dc096ed0ff953c0bd17144)) - (Tonye Jack)
|
||||
- Updated .github/FUNDING.yml ([8e62bee](https://github.com/tj-actions/changed-files/commit/8e62bee92f800ef13879d41004367f912f016c85)) - (Tonye Jack)
|
||||
- Updated .github/FUNDING.yml ([02ce009](https://github.com/tj-actions/changed-files/commit/02ce009f4243cd05f1381c43c6a1d48f68a3b485)) - (Tonye Jack)
|
||||
- Updated README.md ([#1486](https://github.com/tj-actions/changed-files/issues/1486))
|
||||
|
||||
Co-authored-by: jackton1 <jackton1@users.noreply.github.com> ([88a8df6](https://github.com/tj-actions/changed-files/commit/88a8df65a2f24314ca8833c27ec427ffe6809039)) - (tj-actions[bot])
|
||||
- Updated README.md ([#1485](https://github.com/tj-actions/changed-files/issues/1485))
|
||||
|
||||
Co-authored-by: repo-ranger[bot] <repo-ranger[bot]@users.noreply.github.com>
|
||||
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com> ([5c42e98](https://github.com/tj-actions/changed-files/commit/5c42e98b8fe904db676293fa7156514c905af8c4)) - (tj-actions[bot])
|
||||
- Updated README.md ([#1483](https://github.com/tj-actions/changed-files/issues/1483))
|
||||
|
||||
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
|
||||
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com> ([088d89c](https://github.com/tj-actions/changed-files/commit/088d89c918a1e7d236520ec4e7daea1d959d41e5)) - (tj-actions[bot])
|
||||
- Update update-readme.yml ([8299ae0](https://github.com/tj-actions/changed-files/commit/8299ae07ec237ebe1c58a4cc49b9c1e064d927fa)) - (Tonye Jack)
|
||||
- Update update-readme.yml ([fd8ad0b](https://github.com/tj-actions/changed-files/commit/fd8ad0b93433d4d8c80427eb93ae5e78b8a1ce7c)) - (Tonye Jack)
|
||||
|
||||
## <!-- 7 -->⚙️ Miscellaneous Tasks
|
||||
|
||||
- **deps:** Bump test/demo from `f0065d7` to `8bbc726` ([#1492](https://github.com/tj-actions/changed-files/issues/1492)) ([b86b505](https://github.com/tj-actions/changed-files/commit/b86b5055c618b14573c5d8f6d7198309ea0828ac)) - (dependabot[bot])
|
||||
- **deps:** Lock file maintenance ([2cd8943](https://github.com/tj-actions/changed-files/commit/2cd89433debfbbf5e77c95d38dac646ff3a76ebc)) - (renovate[bot])
|
||||
- **deps:** Update dependency @types/node to v20.5.6 ([6cb2857](https://github.com/tj-actions/changed-files/commit/6cb2857ef0a3296d70201f34aa4ca530deb48e38)) - (renovate[bot])
|
||||
- **deps:** Update dependency typescript to v5.2.2 ([716bc48](https://github.com/tj-actions/changed-files/commit/716bc48e21c1367a2c750432fff2cc1dd8fe4ead)) - (renovate[bot])
|
||||
- **deps:** Update dependency jest to v29.6.4 ([6afd248](https://github.com/tj-actions/changed-files/commit/6afd248b1827a2f7943482875140b770f36cc4e8)) - (renovate[bot])
|
||||
- **deps:** Update tj-actions/auto-doc action to v3 ([#1484](https://github.com/tj-actions/changed-files/issues/1484)) ([fd5abe1](https://github.com/tj-actions/changed-files/commit/fd5abe1ac5fb8d024051c757ad9bf1fc6b767e6c)) - (renovate[bot])
|
||||
|
||||
## <!-- 9 -->⬆️ Upgrades
|
||||
|
||||
- Upgraded to v38.1.0 ([#1482](https://github.com/tj-actions/changed-files/issues/1482))
|
||||
|
||||
Co-authored-by: jackton1 <jackton1@users.noreply.github.com> ([2fc6aa8](https://github.com/tj-actions/changed-files/commit/2fc6aa80df596875e0f74f1df939e72b7627e867)) - (tj-actions[bot])
|
||||
|
||||
# [38.1.0](https://github.com/tj-actions/changed-files/compare/v38.0.0...v38.1.0) - (2023-08-23)
|
||||
|
||||
## <!-- 0 -->🚀 Features
|
||||
|
||||
- Add support for fetching additional history for submodules ([#1476](https://github.com/tj-actions/changed-files/issues/1476)) ([5693615](https://github.com/tj-actions/changed-files/commit/569361586a6cff9491312916c5e703a443417e81)) - (Tonye Jack)
|
||||
|
||||
## <!-- 26 -->🔄 Update
|
||||
|
||||
- Updated README.md ([#1477](https://github.com/tj-actions/changed-files/issues/1477))
|
||||
|
||||
Co-authored-by: jackton1 <jackton1@users.noreply.github.com> ([e4e7694](https://github.com/tj-actions/changed-files/commit/e4e76943d643113dcf1458aecb541063cbdc63fd)) - (tj-actions[bot])
|
||||
|
||||
## <!-- 7 -->⚙️ Miscellaneous Tasks
|
||||
|
||||
- **deps:** Bump test/demo from `e168fac` to `f0065d7` ([#1481](https://github.com/tj-actions/changed-files/issues/1481)) ([1c26215](https://github.com/tj-actions/changed-files/commit/1c26215f3fbd51eba03bc199e5cbabdfc3584ce3)) - (dependabot[bot])
|
||||
- **deps-dev:** Bump @types/node from 20.5.3 to 20.5.4 ([#1480](https://github.com/tj-actions/changed-files/issues/1480)) ([7b1e154](https://github.com/tj-actions/changed-files/commit/7b1e1540e27d3397053816b2bcf36f17cfc6cf2f)) - (dependabot[bot])
|
||||
- Move submodule update to dependabot and remove unused workflow ([#1478](https://github.com/tj-actions/changed-files/issues/1478)) ([02010ed](https://github.com/tj-actions/changed-files/commit/02010edac36d80b90e96e94e505a9e34a67f7b89)) - (Tonye Jack)
|
||||
- **deps:** Lock file maintenance ([7852182](https://github.com/tj-actions/changed-files/commit/785218258b790e5191c8655f483824c7e8c226da)) - (renovate[bot])
|
||||
|
||||
## <!-- 9 -->⬆️ Upgrades
|
||||
|
||||
- Upgraded to v38 ([#1474](https://github.com/tj-actions/changed-files/issues/1474))
|
||||
|
||||
Co-authored-by: jackton1 <jackton1@users.noreply.github.com> ([0b45bc6](https://github.com/tj-actions/changed-files/commit/0b45bc64c29a84aea65c944b5a06b6c75844dfaa)) - (tj-actions[bot])
|
||||
|
||||
# [38.0.0](https://github.com/tj-actions/changed-files/compare/v37.6.1...v38.0.0) - (2023-08-23)
|
||||
|
||||
## <!-- 0 -->🚀 Features
|
||||
|
||||
- Add support for including matching changed files when dir_names is set to true ([#1464](https://github.com/tj-actions/changed-files/issues/1464)) ([8789204](https://github.com/tj-actions/changed-files/commit/8789204f9747de46e322edc26ccef589722b5d12)) - (Tonye Jack)
|
||||
|
||||
## <!-- 1 -->🐛 Bug Fixes
|
||||
|
||||
- Error getting diff for submodules ([#1473](https://github.com/tj-actions/changed-files/issues/1473)) ([17f3fec](https://github.com/tj-actions/changed-files/commit/17f3fec1edef0c3916d59cbcee1585fcd457e456)) - (Tonye Jack)
|
||||
- Bug with locating the previous tag ([#1470](https://github.com/tj-actions/changed-files/issues/1470)) ([fc63326](https://github.com/tj-actions/changed-files/commit/fc633265449c7430ee5634b1c673247b313ef8cf)) - (Tonye Jack)
|
||||
|
||||
## <!-- 26 -->🔄 Update
|
||||
|
||||
- Updated README.md ([#1466](https://github.com/tj-actions/changed-files/issues/1466))
|
||||
|
||||
Co-authored-by: repo-ranger[bot] <repo-ranger[bot]@users.noreply.github.com> ([e8f1278](https://github.com/tj-actions/changed-files/commit/e8f12786b4779b5208c8e0593863215f52c804e0)) - (tj-actions[bot])
|
||||
- Update README.md ([f8b4039](https://github.com/tj-actions/changed-files/commit/f8b4039d9628a18c5e26b11a098230dd037e299e)) - (Tonye Jack)
|
||||
- Update README.md ([0e8eddf](https://github.com/tj-actions/changed-files/commit/0e8eddfd8c525e4d8522d7de71af8ad5e4290b90)) - (Tonye Jack)
|
||||
|
||||
## <!-- 7 -->⚙️ Miscellaneous Tasks
|
||||
|
||||
- Update test ([#1469](https://github.com/tj-actions/changed-files/issues/1469)) ([52dbf3e](https://github.com/tj-actions/changed-files/commit/52dbf3e3cf799a1324a9c148c64948abbf8c3fa6)) - (Tonye Jack)
|
||||
- **deps:** Update dependency @types/jest to v29.5.4 ([#1472](https://github.com/tj-actions/changed-files/issues/1472)) ([0a814e4](https://github.com/tj-actions/changed-files/commit/0a814e4372753d6beb4a9ec8f4166aea312f679a)) - (renovate[bot])
|
||||
- **deps:** Update dependency @types/node to v20.5.3 ([#1467](https://github.com/tj-actions/changed-files/issues/1467)) ([18bacaa](https://github.com/tj-actions/changed-files/commit/18bacaab15227e761b04fb4097648318590be71a)) - (renovate[bot])
|
||||
- Update .eslintrc.json ([#1465](https://github.com/tj-actions/changed-files/issues/1465)) ([819fb64](https://github.com/tj-actions/changed-files/commit/819fb645201f8693c48ca1158b4069d0c7cec64d)) - (Tonye Jack)
|
||||
- **deps:** Update typescript-eslint monorepo to v6.4.1 ([#1463](https://github.com/tj-actions/changed-files/issues/1463)) ([31003b4](https://github.com/tj-actions/changed-files/commit/31003b45e6faa01151aeb2508de21d895b9024d8)) - (renovate[bot])
|
||||
- **deps:** Update dependency jest to v29.6.3 ([#1462](https://github.com/tj-actions/changed-files/issues/1462)) ([1f04b16](https://github.com/tj-actions/changed-files/commit/1f04b16682ff06e18be316b672337f43ebd8f768)) - (renovate[bot])
|
||||
- **deps:** Lock file maintenance ([#1461](https://github.com/tj-actions/changed-files/issues/1461)) ([0a8b04e](https://github.com/tj-actions/changed-files/commit/0a8b04e3e345eae4a8aa28fb46959c1509197ee5)) - (renovate[bot])
|
||||
- **deps:** Update dependency @types/node to v20.5.1 ([#1460](https://github.com/tj-actions/changed-files/issues/1460)) ([6da496e](https://github.com/tj-actions/changed-files/commit/6da496e2f92930ffc11735db0b53e4e2027e9e26)) - (renovate[bot])
|
||||
- **deps:** Update actions/setup-node action to v3.8.1 ([#1459](https://github.com/tj-actions/changed-files/issues/1459)) ([68d38a3](https://github.com/tj-actions/changed-files/commit/68d38a3f163ab827c733c45c9f23d607401a34ce)) - (renovate[bot])
|
||||
|
||||
## <!-- 9 -->⬆️ Upgrades
|
||||
|
||||
- Upgraded to v37.6.1 ([#1458](https://github.com/tj-actions/changed-files/issues/1458))
|
||||
|
||||
Co-authored-by: jackton1 <jackton1@users.noreply.github.com> ([3645cf9](https://github.com/tj-actions/changed-files/commit/3645cf9fc374b6e501b12888142f2aabc6b3cbf9)) - (tj-actions[bot])
|
||||
|
||||
# [37.6.1](https://github.com/tj-actions/changed-files/compare/v37.6.0...v37.6.1) - (2023-08-15)
|
||||
|
||||
## <!-- 26 -->🔄 Update
|
||||
|
||||
299
README.md
299
README.md
@@ -19,25 +19,27 @@ Effortlessly track all changed files and directories relative to a target branch
|
||||
|
||||
## 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)
|
||||
* [Known Limitation](#known-limitation)
|
||||
* [Migration guide](#migration-guide)
|
||||
* [Credits](#credits)
|
||||
* [Report Bugs](#report-bugs)
|
||||
* [Features 🚀](#features-)
|
||||
* [Usage 💻](#usage-)
|
||||
* [On `pull_request` 🔀](#on-pull_request-)
|
||||
* [Using local .git history 📁](#using-local-git-history-)
|
||||
* [Using Github's API :octocat:](#using-githubs-api-octocat)
|
||||
* [On `push` ⬆️](#on-push-️)
|
||||
* [Useful Acronyms 🧮](#useful-acronyms-)
|
||||
* [Outputs 📤](#outputs-)
|
||||
* [Inputs ⚙️](#inputs-️)
|
||||
* [Versioning 🏷️](#versioning-️)
|
||||
* [Examples 📄](#examples-)
|
||||
* [Real-world usage 🌐](#real-world-usage-)
|
||||
* [Open source projects 📦](#open-source-projects-)
|
||||
* [Scalability Example 📈](#scalability-example-)
|
||||
* [Known Limitation ⚠️](#known-limitation-️)
|
||||
* [Migration guide 🔄](#migration-guide-)
|
||||
* [Credits 👏](#credits-)
|
||||
* [Report Bugs 🐛](#report-bugs-)
|
||||
* [Contributors ✨](#contributors-)
|
||||
|
||||
## Features
|
||||
## Features 🚀
|
||||
|
||||
* 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.
|
||||
@@ -72,7 +74,7 @@ Effortlessly track all changed files and directories relative to a target branch
|
||||
|
||||
And many more...
|
||||
|
||||
## Usage
|
||||
## Usage 💻
|
||||
|
||||
> **Warning**
|
||||
>
|
||||
@@ -84,9 +86,9 @@ And many more...
|
||||
|
||||
Visit the [discussions for more information](https://github.com/tj-actions/changed-files/discussions) or [create a new discussion](https://github.com/tj-actions/changed-files/discussions/new/choose) for usage-related questions.
|
||||
|
||||
### On `pull_request`
|
||||
### On `pull_request` 🔀
|
||||
|
||||
#### Using local .git history
|
||||
#### Using local .git history 📁
|
||||
|
||||
```yaml
|
||||
name: CI
|
||||
@@ -111,7 +113,7 @@ jobs:
|
||||
# Example 1
|
||||
- name: Get all test, doc and src files that have changed
|
||||
id: changed-files-yaml
|
||||
uses: tj-actions/changed-files@v37
|
||||
uses: tj-actions/changed-files@v38
|
||||
with:
|
||||
files_yaml: |
|
||||
doc:
|
||||
@@ -141,7 +143,7 @@ jobs:
|
||||
# Example 2
|
||||
- name: Get changed files
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@v37
|
||||
uses: tj-actions/changed-files@v38
|
||||
|
||||
# To compare changes between the current commit and the last pushed remote commit set `since_last_remote_commit: true`. e.g
|
||||
# with:
|
||||
@@ -156,7 +158,7 @@ jobs:
|
||||
# Example 3
|
||||
- name: Get changed files in the docs folder
|
||||
id: changed-files-specific
|
||||
uses: tj-actions/changed-files@v37
|
||||
uses: tj-actions/changed-files@v38
|
||||
with:
|
||||
files: docs/*.{js,html} # Alternatively using: `docs/**` or `docs`
|
||||
files_ignore: docs/static.js
|
||||
@@ -168,7 +170,7 @@ jobs:
|
||||
echo "List all the files that have changed: ${{ steps.changed-files-specific.outputs.all_changed_files }}"
|
||||
```
|
||||
|
||||
#### Using Github's API
|
||||
#### Using Github's API :octocat:
|
||||
|
||||
```yaml
|
||||
name: CI
|
||||
@@ -196,7 +198,7 @@ jobs:
|
||||
steps:
|
||||
- name: Get changed files
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@v37
|
||||
uses: tj-actions/changed-files@v38
|
||||
|
||||
- name: List all changed files
|
||||
run: |
|
||||
@@ -205,7 +207,7 @@ jobs:
|
||||
done
|
||||
```
|
||||
|
||||
### On `push`
|
||||
### On `push` ⬆️
|
||||
|
||||
```yaml
|
||||
name: CI
|
||||
@@ -256,7 +258,7 @@ jobs:
|
||||
# Example 1
|
||||
- name: Get changed files
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@v37
|
||||
uses: tj-actions/changed-files@v38
|
||||
|
||||
# NOTE: `since_last_remote_commit: true` is implied by default and falls back to the previous local commit.
|
||||
|
||||
@@ -285,7 +287,7 @@ Support this project with a :star:
|
||||
|
||||
[buymeacoffee-shield]: https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png
|
||||
|
||||
## Useful Acronyms
|
||||
## Useful Acronyms 🧮
|
||||
|
||||
| Acronym | Meaning |
|
||||
|:---------:|:------------:|
|
||||
@@ -302,107 +304,110 @@ Support this project with a :star:
|
||||
>
|
||||
> * When using `files_yaml*` inputs ensure all outputs are prefixed by the key `test_{...}` e.g. `test_added_files`, `test_any_changed`
|
||||
|
||||
## Outputs
|
||||
## Outputs 📤
|
||||
|
||||
<!-- AUTO-DOC-OUTPUT:START - Do not remove or modify this section -->
|
||||
|
||||
| OUTPUT | TYPE | DESCRIPTION |
|
||||
|--------------------------------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| added\_files | string | Returns only files that are <br>Added (A). |
|
||||
| added\_files\_count | string | Returns the number of `added_files` |
|
||||
| all\_changed\_and\_modified\_files | string | Returns all changed and modified <br>files i.e. *a combination of (ACMRDTUX)* |
|
||||
| all\_changed\_and\_modified\_files\_count | string | Returns the number of `all_changed_and_modified_files` |
|
||||
| all\_changed\_files | string | Returns all changed files i.e. <br>*a combination of all added, copied, modified and renamed files (ACMR)* |
|
||||
| all\_changed\_files\_count | string | Returns the number of `all_changed_files` |
|
||||
| all\_modified\_files | string | Returns all changed files i.e. <br>*a combination of all added, copied, modified, renamed and deleted files (ACMRD)*. |
|
||||
| all\_modified\_files\_count | string | Returns the number of `all_modified_files` |
|
||||
| all\_old\_new\_renamed\_files | string | Returns only files that are <br>Renamed and lists their old <br>and new names. **NOTE:** This <br>requires setting `include_all_old_new_renamed_files` to `true`. <br>Also, keep in mind that <br>this output is global and <br>wouldn't be nested in outputs <br>generated when the `*_yaml_*` input <br>is used. (R) |
|
||||
| all\_old\_new\_renamed\_files\_count | string | Returns the number of `all_old_new_renamed_files` |
|
||||
| any\_changed | string | Returns `true` when any of <br>the filenames provided using the <br>`files*` or `files_ignore*` inputs has changed. i.e. <br>*using a combination of all added, copied, modified and renamed files (ACMR)*. |
|
||||
| any\_deleted | string | Returns `true` when any of <br>the filenames provided using the <br>`files*` or `files_ignore*` inputs has been deleted. <br>(D) |
|
||||
| any\_modified | string | Returns `true` when any of <br>the filenames provided using the <br>`files*` or `files_ignore*` inputs has been modified. <br>i.e. *using a combination of all added, copied, modified, renamed, and deleted files (ACMRD)*. |
|
||||
| copied\_files | string | Returns only files that are <br>Copied (C). |
|
||||
| copied\_files\_count | string | Returns the number of `copied_files` |
|
||||
| deleted\_files | string | Returns only files that are <br>Deleted (D). |
|
||||
| deleted\_files\_count | string | Returns the number of `deleted_files` |
|
||||
| modified\_files | string | Returns only files that are <br>Modified (M). |
|
||||
| modified\_files\_count | string | Returns the number of `modified_files` |
|
||||
| only\_changed | string | Returns `true` when only files <br>provided using the `files*` or `files_ignore*` inputs <br>has changed. i.e. *using a combination of all added, copied, modified and renamed files (ACMR)*. |
|
||||
| only\_deleted | string | Returns `true` when only files <br>provided using the `files*` or `files_ignore*` inputs <br>has been deleted. (D) |
|
||||
| only\_modified | string | Returns `true` when only files <br>provided using the `files*` or `files_ignore*` inputs <br>has been modified. (ACMRD). |
|
||||
| other\_changed\_files | string | Returns all other changed files <br>not listed in the files <br>input i.e. *using a combination of all added, copied, modified and renamed files (ACMR)*. |
|
||||
| other\_changed\_files\_count | string | Returns the number of `other_changed_files` |
|
||||
| other\_deleted\_files | string | Returns all other deleted files <br>not listed in the files <br>input i.e. *a combination of all deleted files (D)* |
|
||||
| other\_deleted\_files\_count | string | Returns the number of `other_deleted_files` |
|
||||
| other\_modified\_files | string | Returns all other modified files <br>not listed in the files <br>input i.e. *a combination of all added, copied, modified, and deleted files (ACMRD)* |
|
||||
| other\_modified\_files\_count | string | Returns the number of `other_modified_files` |
|
||||
| renamed\_files | string | Returns only files that are <br>Renamed (R). |
|
||||
| renamed\_files\_count | string | Returns the number of `renamed_files` |
|
||||
| type\_changed\_files | string | Returns only files that have <br>their file type changed (T). |
|
||||
| type\_changed\_files\_count | string | Returns the number of `type_changed_files` |
|
||||
| unknown\_files | string | Returns only files that are <br>Unknown (X). |
|
||||
| unknown\_files\_count | string | Returns the number of `unknown_files` |
|
||||
| unmerged\_files | string | Returns only files that are <br>Unmerged (U). |
|
||||
| unmerged\_files\_count | string | Returns the number of `unmerged_files` |
|
||||
| OUTPUT | TYPE | DESCRIPTION |
|
||||
|------------------------------------------------------------------------------------------------------------------------------------------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| <a name="output_added_files"></a>[added\_files](#output_added_files) | string | Returns only files that are <br>Added (A). |
|
||||
| <a name="output_added_files_count"></a>[added\_files\_count](#output_added_files_count) | string | Returns the number of `added_files` |
|
||||
| <a name="output_all_changed_and_modified_files"></a>[all\_changed\_and\_modified\_files](#output_all_changed_and_modified_files) | string | Returns all changed and modified <br>files i.e. *a combination of (ACMRDTUX)* |
|
||||
| <a name="output_all_changed_and_modified_files_count"></a>[all\_changed\_and\_modified\_files\_count](#output_all_changed_and_modified_files_count) | string | Returns the number of `all_changed_and_modified_files` |
|
||||
| <a name="output_all_changed_files"></a>[all\_changed\_files](#output_all_changed_files) | string | Returns all changed files i.e. <br>*a combination of all added, copied, modified and renamed files (ACMR)* |
|
||||
| <a name="output_all_changed_files_count"></a>[all\_changed\_files\_count](#output_all_changed_files_count) | string | Returns the number of `all_changed_files` |
|
||||
| <a name="output_all_modified_files"></a>[all\_modified\_files](#output_all_modified_files) | string | Returns all changed files i.e. <br>*a combination of all added, copied, modified, renamed and deleted files (ACMRD)*. |
|
||||
| <a name="output_all_modified_files_count"></a>[all\_modified\_files\_count](#output_all_modified_files_count) | string | Returns the number of `all_modified_files` |
|
||||
| <a name="output_all_old_new_renamed_files"></a>[all\_old\_new\_renamed\_files](#output_all_old_new_renamed_files) | string | Returns only files that are <br>Renamed and lists their old <br>and new names. **NOTE:** This <br>requires setting `include_all_old_new_renamed_files` to `true`. <br>Also, keep in mind that <br>this output is global and <br>wouldn't be nested in outputs <br>generated when the `*_yaml_*` input <br>is used. (R) |
|
||||
| <a name="output_all_old_new_renamed_files_count"></a>[all\_old\_new\_renamed\_files\_count](#output_all_old_new_renamed_files_count) | string | Returns the number of `all_old_new_renamed_files` |
|
||||
| <a name="output_any_changed"></a>[any\_changed](#output_any_changed) | string | Returns `true` when any of <br>the filenames provided using the <br>`files*` or `files_ignore*` inputs has changed. i.e. <br>*using a combination of all added, copied, modified and renamed files (ACMR)*. |
|
||||
| <a name="output_any_deleted"></a>[any\_deleted](#output_any_deleted) | string | Returns `true` when any of <br>the filenames provided using the <br>`files*` or `files_ignore*` inputs has been deleted. <br>(D) |
|
||||
| <a name="output_any_modified"></a>[any\_modified](#output_any_modified) | string | Returns `true` when any of <br>the filenames provided using the <br>`files*` or `files_ignore*` inputs has been modified. <br>i.e. *using a combination of all added, copied, modified, renamed, and deleted files (ACMRD)*. |
|
||||
| <a name="output_copied_files"></a>[copied\_files](#output_copied_files) | string | Returns only files that are <br>Copied (C). |
|
||||
| <a name="output_copied_files_count"></a>[copied\_files\_count](#output_copied_files_count) | string | Returns the number of `copied_files` |
|
||||
| <a name="output_deleted_files"></a>[deleted\_files](#output_deleted_files) | string | Returns only files that are <br>Deleted (D). |
|
||||
| <a name="output_deleted_files_count"></a>[deleted\_files\_count](#output_deleted_files_count) | string | Returns the number of `deleted_files` |
|
||||
| <a name="output_modified_files"></a>[modified\_files](#output_modified_files) | string | Returns only files that are <br>Modified (M). |
|
||||
| <a name="output_modified_files_count"></a>[modified\_files\_count](#output_modified_files_count) | string | Returns the number of `modified_files` |
|
||||
| <a name="output_only_changed"></a>[only\_changed](#output_only_changed) | string | Returns `true` when only files <br>provided using the `files*` or `files_ignore*` inputs <br>has changed. i.e. *using a combination of all added, copied, modified and renamed files (ACMR)*. |
|
||||
| <a name="output_only_deleted"></a>[only\_deleted](#output_only_deleted) | string | Returns `true` when only files <br>provided using the `files*` or `files_ignore*` inputs <br>has been deleted. (D) |
|
||||
| <a name="output_only_modified"></a>[only\_modified](#output_only_modified) | string | Returns `true` when only files <br>provided using the `files*` or `files_ignore*` inputs <br>has been modified. (ACMRD). |
|
||||
| <a name="output_other_changed_files"></a>[other\_changed\_files](#output_other_changed_files) | string | Returns all other changed files <br>not listed in the files <br>input i.e. *using a combination of all added, copied, modified and renamed files (ACMR)*. |
|
||||
| <a name="output_other_changed_files_count"></a>[other\_changed\_files\_count](#output_other_changed_files_count) | string | Returns the number of `other_changed_files` |
|
||||
| <a name="output_other_deleted_files"></a>[other\_deleted\_files](#output_other_deleted_files) | string | Returns all other deleted files <br>not listed in the files <br>input i.e. *a combination of all deleted files (D)* |
|
||||
| <a name="output_other_deleted_files_count"></a>[other\_deleted\_files\_count](#output_other_deleted_files_count) | string | Returns the number of `other_deleted_files` |
|
||||
| <a name="output_other_modified_files"></a>[other\_modified\_files](#output_other_modified_files) | string | Returns all other modified files <br>not listed in the files <br>input i.e. *a combination of all added, copied, modified, and deleted files (ACMRD)* |
|
||||
| <a name="output_other_modified_files_count"></a>[other\_modified\_files\_count](#output_other_modified_files_count) | string | Returns the number of `other_modified_files` |
|
||||
| <a name="output_renamed_files"></a>[renamed\_files](#output_renamed_files) | string | Returns only files that are <br>Renamed (R). |
|
||||
| <a name="output_renamed_files_count"></a>[renamed\_files\_count](#output_renamed_files_count) | string | Returns the number of `renamed_files` |
|
||||
| <a name="output_type_changed_files"></a>[type\_changed\_files](#output_type_changed_files) | string | Returns only files that have <br>their file type changed (T). |
|
||||
| <a name="output_type_changed_files_count"></a>[type\_changed\_files\_count](#output_type_changed_files_count) | string | Returns the number of `type_changed_files` |
|
||||
| <a name="output_unknown_files"></a>[unknown\_files](#output_unknown_files) | string | Returns only files that are <br>Unknown (X). |
|
||||
| <a name="output_unknown_files_count"></a>[unknown\_files\_count](#output_unknown_files_count) | string | Returns the number of `unknown_files` |
|
||||
| <a name="output_unmerged_files"></a>[unmerged\_files](#output_unmerged_files) | string | Returns only files that are <br>Unmerged (U). |
|
||||
| <a name="output_unmerged_files_count"></a>[unmerged\_files\_count](#output_unmerged_files_count) | string | Returns the number of `unmerged_files` |
|
||||
|
||||
<!-- AUTO-DOC-OUTPUT:END -->
|
||||
|
||||
## Inputs
|
||||
## Inputs ⚙️
|
||||
|
||||
<!-- AUTO-DOC-INPUT:START - Do not remove or modify this section -->
|
||||
|
||||
| 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\_include\_files | string | false | | Include files in the output <br>when `dir_names` is set to <br>`true`. **NOTE:** This returns only <br>the matching files and also <br>the directory names. |
|
||||
| dir\_names\_include\_files\_separator | string | false | `"\n"` | Separator used to split the <br>`dir_names_include_files` input |
|
||||
| dir\_names\_max\_depth | string | false | | Limit the directory output to <br>a maximum depth e.g `test/test1/test2` <br>with max depth of `2` <br>returns `test/test1`. |
|
||||
| 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, defaults <br>to the patterns provided via <br>the `files`, `files_from_source_file`, `files_ignore` and <br>`files_ignore_from_source_file` inputs or all deleted <br>files if no patterns are <br>provided. |
|
||||
| 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`. |
|
||||
| INPUT | TYPE | REQUIRED | DEFAULT | DESCRIPTION |
|
||||
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------|----------|---------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| <a name="input_api_url"></a>[api\_url](#input_api_url) | string | false | `"${{ github.api_url }}"` | Github API URL. |
|
||||
| <a name="input_base_sha"></a>[base\_sha](#input_base_sha) | string | false | | Specify a different base commit <br>SHA used for comparing changes |
|
||||
| <a name="input_diff_relative"></a>[diff\_relative](#input_diff_relative) | string | false | `"true"` | Exclude changes outside the current <br>directory and show path names <br>relative to it. **NOTE:** This <br>requires you to specify the <br>top level directory via the <br>`path` input. |
|
||||
| <a name="input_dir_names"></a>[dir\_names](#input_dir_names) | string | false | `"false"` | Output unique changed directories instead <br>of filenames. **NOTE:** This returns <br>`.` for changed files located <br>in the current working directory <br>which defaults to `$GITHUB_WORKSPACE`. |
|
||||
| <a name="input_dir_names_exclude_current_dir"></a>[dir\_names\_exclude\_current\_dir](#input_dir_names_exclude_current_dir) | string | false | `"false"` | Exclude the current directory represented <br>by `.` from the output <br>when `dir_names` is set to <br>`true`. |
|
||||
| <a name="input_dir_names_include_files"></a>[dir\_names\_include\_files](#input_dir_names_include_files) | string | false | | Include files in the output <br>when `dir_names` is set to <br>`true`. **NOTE:** This returns only <br>the matching files and also <br>the directory names. |
|
||||
| <a name="input_dir_names_include_files_separator"></a>[dir\_names\_include\_files\_separator](#input_dir_names_include_files_separator) | string | false | `"\n"` | Separator used to split the <br>`dir_names_include_files` input |
|
||||
| <a name="input_dir_names_max_depth"></a>[dir\_names\_max\_depth](#input_dir_names_max_depth) | string | false | | Limit the directory output to <br>a maximum depth e.g `test/test1/test2` <br>with max depth of `2` <br>returns `test/test1`. |
|
||||
| <a name="input_escape_json"></a>[escape\_json](#input_escape_json) | string | false | `"true"` | Escape JSON output. |
|
||||
| <a name="input_fail_on_initial_diff_error"></a>[fail\_on\_initial\_diff\_error](#input_fail_on_initial_diff_error) | string | false | `"false"` | Fail when the initial diff <br>fails. |
|
||||
| <a name="input_fail_on_submodule_diff_error"></a>[fail\_on\_submodule\_diff\_error](#input_fail_on_submodule_diff_error) | string | false | `"false"` | Fail when the submodule diff <br>fails. |
|
||||
| <a name="input_fetch_additional_submodule_history"></a>[fetch\_additional\_submodule\_history](#input_fetch_additional_submodule_history) | string | false | `"false"` | Fetch additional history for submodules. |
|
||||
| <a name="input_fetch_depth"></a>[fetch\_depth](#input_fetch_depth) | string | false | `"50"` | Depth of additional branch history <br>fetched. **NOTE**: This can be <br>adjusted to resolve errors with <br>insufficient history. |
|
||||
| <a name="input_files"></a>[files](#input_files) | string | false | | File and directory patterns used <br>to detect changes (Defaults to the entire repo if unset) **NOTE:** <br>Multiline file/directory patterns should not <br>include quotes. |
|
||||
| <a name="input_files_from_source_file"></a>[files\_from\_source\_file](#input_files_from_source_file) | string | false | | Source file(s) used to populate <br>the `files` input. |
|
||||
| <a name="input_files_from_source_file_separator"></a>[files\_from\_source\_file\_separator](#input_files_from_source_file_separator) | string | false | `"\n"` | Separator used to split the <br>`files_from_source_file` input |
|
||||
| <a name="input_files_ignore"></a>[files\_ignore](#input_files_ignore) | string | false | | Ignore changes to these file(s) <br>**NOTE:** Multiline file/directory patterns should <br>not include quotes. |
|
||||
| <a name="input_files_ignore_from_source_file"></a>[files\_ignore\_from\_source\_file](#input_files_ignore_from_source_file) | string | false | | Source file(s) used to populate <br>the `files_ignore` input |
|
||||
| <a name="input_files_ignore_from_source_file_separator"></a>[files\_ignore\_from\_source\_file\_separator](#input_files_ignore_from_source_file_separator) | string | false | `"\n"` | Separator used to split the <br>`files_ignore_from_source_file` input |
|
||||
| <a name="input_files_ignore_separator"></a>[files\_ignore\_separator](#input_files_ignore_separator) | string | false | `"\n"` | Separator used to split the <br>`files_ignore` input |
|
||||
| <a name="input_files_ignore_yaml"></a>[files\_ignore\_yaml](#input_files_ignore_yaml) | string | false | | YAML used to define a <br>set of file patterns to <br>ignore changes |
|
||||
| <a name="input_files_ignore_yaml_from_source_file"></a>[files\_ignore\_yaml\_from\_source\_file](#input_files_ignore_yaml_from_source_file) | string | false | | Source file(s) used to populate <br>the `files_ignore_yaml` input. [Example](https://github.com/tj-actions/changed-files/blob/main/test/changed-files.yml) |
|
||||
| <a name="input_files_ignore_yaml_from_source_file_separator"></a>[files\_ignore\_yaml\_from\_source\_file\_separator](#input_files_ignore_yaml_from_source_file_separator) | string | false | `"\n"` | Separator used to split the <br>`files_ignore_yaml_from_source_file` input |
|
||||
| <a name="input_files_separator"></a>[files\_separator](#input_files_separator) | string | false | `"\n"` | Separator used to split the <br>`files` input |
|
||||
| <a name="input_files_yaml"></a>[files\_yaml](#input_files_yaml) | string | false | | YAML used to define a <br>set of file patterns to <br>detect changes |
|
||||
| <a name="input_files_yaml_from_source_file"></a>[files\_yaml\_from\_source\_file](#input_files_yaml_from_source_file) | string | false | | Source file(s) used to populate <br>the `files_yaml` input. [Example](https://github.com/tj-actions/changed-files/blob/main/test/changed-files.yml) |
|
||||
| <a name="input_files_yaml_from_source_file_separator"></a>[files\_yaml\_from\_source\_file\_separator](#input_files_yaml_from_source_file_separator) | string | false | `"\n"` | Separator used to split the <br>`files_yaml_from_source_file` input |
|
||||
| <a name="input_include_all_old_new_renamed_files"></a>[include\_all\_old\_new\_renamed\_files](#input_include_all_old_new_renamed_files) | string | false | `"false"` | Include `all_old_new_renamed_files` output. Note this <br>can generate a large output <br>See: [#501](https://github.com/tj-actions/changed-files/issues/501). |
|
||||
| <a name="input_json"></a>[json](#input_json) | string | false | `"false"` | Output list of changed files <br>in a JSON formatted string <br>which can be used for <br>matrix jobs. |
|
||||
| <a name="input_old_new_files_separator"></a>[old\_new\_files\_separator](#input_old_new_files_separator) | string | false | `" "` | Split character for old and <br>new renamed filename pairs. |
|
||||
| <a name="input_old_new_separator"></a>[old\_new\_separator](#input_old_new_separator) | string | false | `","` | Split character for old and <br>new filename pairs. |
|
||||
| <a name="input_output_dir"></a>[output\_dir](#input_output_dir) | string | false | `".github/outputs"` | Directory to store output files. |
|
||||
| <a name="input_output_renamed_files_as_deleted_and_added"></a>[output\_renamed\_files\_as\_deleted\_and\_added](#input_output_renamed_files_as_deleted_and_added) | string | false | `"false"` | Output renamed files as deleted <br>and added files. |
|
||||
| <a name="input_path"></a>[path](#input_path) | string | false | `"."` | Specify a relative path under <br>`$GITHUB_WORKSPACE` to locate the repository. |
|
||||
| <a name="input_quotepath"></a>[quotepath](#input_quotepath) | string | false | `"true"` | Use non-ascii characters to match <br>files and output the filenames <br>completely verbatim by setting this <br>to `false` |
|
||||
| <a name="input_recover_deleted_files"></a>[recover\_deleted\_files](#input_recover_deleted_files) | string | false | `"false"` | Recover deleted files. |
|
||||
| <a name="input_recover_deleted_files_to_destination"></a>[recover\_deleted\_files\_to\_destination](#input_recover_deleted_files_to_destination) | string | false | | Recover deleted files to a <br>new destination directory, defaults to <br>the original location. |
|
||||
| <a name="input_recover_files"></a>[recover\_files](#input_recover_files) | string | false | | File and directory patterns used <br>to recover deleted files, defaults <br>to the patterns provided via <br>the `files`, `files_from_source_file`, `files_ignore` and <br>`files_ignore_from_source_file` inputs or all deleted <br>files if no patterns are <br>provided. |
|
||||
| <a name="input_recover_files_ignore"></a>[recover\_files\_ignore](#input_recover_files_ignore) | string | false | | File and directory patterns to <br>ignore when recovering deleted files. |
|
||||
| <a name="input_recover_files_ignore_separator"></a>[recover\_files\_ignore\_separator](#input_recover_files_ignore_separator) | string | false | `"\n"` | Separator used to split the <br>`recover_files_ignore` input |
|
||||
| <a name="input_recover_files_separator"></a>[recover\_files\_separator](#input_recover_files_separator) | string | false | `"\n"` | Separator used to split the <br>`recover_files` input |
|
||||
| <a name="input_separator"></a>[separator](#input_separator) | string | false | `" "` | Split character for output strings |
|
||||
| <a name="input_sha"></a>[sha](#input_sha) | string | false | | Specify a different commit SHA <br>used for comparing changes |
|
||||
| <a name="input_since"></a>[since](#input_since) | string | false | | Get changed files for commits <br>whose timestamp is older than <br>the given time. |
|
||||
| <a name="input_since_last_remote_commit"></a>[since\_last\_remote\_commit](#input_since_last_remote_commit) | string | false | `"false"` | Use the last commit on <br>the remote branch as the <br>`base_sha`. Defaults to the last <br>non-merge commit on the target <br>branch for pull request events <br>and the previous remote commit <br>of the current branch for <br>push events. |
|
||||
| <a name="input_skip_initial_fetch"></a>[skip\_initial\_fetch](#input_skip_initial_fetch) | string | false | `"false"` | Skip the initial fetch to <br>improve performance for shallow repositories. <br>**NOTE**: This could lead to <br>errors with missing history and <br>the intended use is limited <br>to when you've fetched the <br>history necessary to perform the <br>diff. |
|
||||
| <a name="input_token"></a>[token](#input_token) | string | false | `"${{ github.token }}"` | Github token used to fetch <br>changed files from Github's API. |
|
||||
| <a name="input_until"></a>[until](#input_until) | string | false | | Get changed files for commits <br>whose timestamp is earlier than <br>the given time. |
|
||||
| <a name="input_write_output_files"></a>[write\_output\_files](#input_write_output_files) | string | false | `"false"` | Write outputs to the `output_dir` <br>defaults to `.github/outputs` folder. **NOTE:** <br>This creates a `.txt` file <br>by default and a `.json` <br>file if `json` is set <br>to `true`. |
|
||||
|
||||
<!-- AUTO-DOC-INPUT:END -->
|
||||
|
||||
## Versioning
|
||||
## Versioning 🏷️
|
||||
|
||||
This GitHub Action follows the principles of [Semantic Versioning](https://semver.org) for versioning releases.
|
||||
|
||||
@@ -414,7 +419,7 @@ The format of the version string is as follows:
|
||||
|
||||
* patch: indicates bug fixes or other small changes that are backward compatible.
|
||||
|
||||
## Examples
|
||||
## Examples 📄
|
||||
|
||||
<details>
|
||||
<summary>Get all changed files in the current branch</summary>
|
||||
@@ -423,7 +428,7 @@ The format of the version string is as follows:
|
||||
...
|
||||
- name: Get changed files
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@v37
|
||||
uses: tj-actions/changed-files@v38
|
||||
...
|
||||
```
|
||||
|
||||
@@ -436,7 +441,7 @@ The format of the version string is as follows:
|
||||
...
|
||||
- name: Get all changed files and use a comma separator in the output
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@v37
|
||||
uses: tj-actions/changed-files@v38
|
||||
with:
|
||||
separator: ","
|
||||
...
|
||||
@@ -453,7 +458,7 @@ See [inputs](#inputs) for more information.
|
||||
...
|
||||
- name: Get changed files
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@v37
|
||||
uses: tj-actions/changed-files@v38
|
||||
|
||||
- name: List all added files
|
||||
run: |
|
||||
@@ -474,7 +479,7 @@ See [outputs](#outputs) for a list of all available outputs.
|
||||
...
|
||||
- name: Get changed files
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@v37
|
||||
uses: tj-actions/changed-files@v38
|
||||
|
||||
- name: Run a step if my-file.txt was modified
|
||||
if: contains(steps.changed-files.outputs.modified_files, 'my-file.txt')
|
||||
@@ -534,7 +539,7 @@ See [outputs](#outputs) for a list of all available outputs.
|
||||
...
|
||||
- name: Get changed files
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@v37
|
||||
uses: tj-actions/changed-files@v38
|
||||
with:
|
||||
files: |
|
||||
my-file.txt
|
||||
@@ -557,7 +562,7 @@ See [inputs](#inputs) for more information.
|
||||
...
|
||||
- name: Get changed files
|
||||
id: changed-files-specific
|
||||
uses: tj-actions/changed-files@v37
|
||||
uses: tj-actions/changed-files@v38
|
||||
with:
|
||||
files: |
|
||||
my-file.txt
|
||||
@@ -604,7 +609,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@v37
|
||||
uses: tj-actions/changed-files@v38
|
||||
with:
|
||||
files_from_source_file: test/changed-files-list.txt
|
||||
...
|
||||
@@ -621,7 +626,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@v37
|
||||
uses: tj-actions/changed-files@v38
|
||||
with:
|
||||
files_from_source_file: |
|
||||
test/changed-files-list.txt
|
||||
@@ -642,7 +647,7 @@ See [inputs](#inputs) for more information.
|
||||
...
|
||||
- name: Get changed files using a different SHA
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@v37
|
||||
uses: tj-actions/changed-files@v38
|
||||
with:
|
||||
sha: ${{ github.event.pull_request.head.sha }}
|
||||
...
|
||||
@@ -659,7 +664,7 @@ See [inputs](#inputs) for more information.
|
||||
...
|
||||
- name: Get changed files using a different base SHA
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@v37
|
||||
uses: tj-actions/changed-files@v38
|
||||
with:
|
||||
base_sha: ${{ github.event.pull_request.base.sha }}
|
||||
...
|
||||
@@ -691,11 +696,11 @@ jobs:
|
||||
|
||||
- name: Get changed files
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@v37
|
||||
uses: tj-actions/changed-files@v38
|
||||
|
||||
- name: Get changed files in the .github folder
|
||||
id: changed-files-specific
|
||||
uses: tj-actions/changed-files@v37
|
||||
uses: tj-actions/changed-files@v38
|
||||
with:
|
||||
base_sha: ${{ steps.get-base-sha.outputs.base_sha }}
|
||||
files: .github/**
|
||||
@@ -725,7 +730,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@v37
|
||||
uses: tj-actions/changed-files@v38
|
||||
with:
|
||||
path: dir1
|
||||
|
||||
@@ -748,7 +753,7 @@ See [inputs](#inputs) for more information.
|
||||
...
|
||||
- name: Run changed-files with quotepath disabled
|
||||
id: changed-files-quotepath
|
||||
uses: tj-actions/changed-files@v37
|
||||
uses: tj-actions/changed-files@v38
|
||||
with:
|
||||
quotepath: "false"
|
||||
|
||||
@@ -787,7 +792,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@v37
|
||||
uses: tj-actions/changed-files@v38
|
||||
with:
|
||||
base_sha: ${{ steps.last_successful_commit_push.outputs.base }}
|
||||
...
|
||||
@@ -814,7 +819,7 @@ See [inputs](#inputs) for more information.
|
||||
|
||||
- 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@v37
|
||||
uses: tj-actions/changed-files@v38
|
||||
with:
|
||||
base_sha: ${{ steps.last_successful_commit_pull_request.outputs.base }}
|
||||
...
|
||||
@@ -840,7 +845,7 @@ See [inputs](#inputs) for more information.
|
||||
...
|
||||
- name: Run changed-files with dir_names
|
||||
id: changed-files-dir-names
|
||||
uses: tj-actions/changed-files@v37
|
||||
uses: tj-actions/changed-files@v38
|
||||
with:
|
||||
dir_names: "true"
|
||||
...
|
||||
@@ -857,7 +862,7 @@ See [inputs](#inputs) for more information.
|
||||
...
|
||||
- name: Run changed-files with JSON output
|
||||
id: changed-files-json
|
||||
uses: tj-actions/changed-files@v37
|
||||
uses: tj-actions/changed-files@v38
|
||||
with:
|
||||
json: "true"
|
||||
...
|
||||
@@ -874,13 +879,13 @@ See [inputs](#inputs) for more information.
|
||||
...
|
||||
- name: Get changed-files since 2022-08-19
|
||||
id: changed-files-since
|
||||
uses: tj-actions/changed-files@v37
|
||||
uses: tj-actions/changed-files@v38
|
||||
with:
|
||||
since: "2022-08-19"
|
||||
|
||||
- name: Get changed-files until 2022-08-20
|
||||
id: changed-files-until
|
||||
uses: tj-actions/changed-files@v37
|
||||
uses: tj-actions/changed-files@v38
|
||||
with:
|
||||
until: "2022-08-20"
|
||||
...
|
||||
@@ -890,7 +895,9 @@ See [inputs](#inputs) for more information.
|
||||
|
||||
</details>
|
||||
|
||||
## Real-world usage
|
||||
## Real-world usage 🌐
|
||||
|
||||
### Open source projects 📦
|
||||
|
||||
* [vitejs/vite: uses tj-actions/changed-files to automate testing](https://github.com/vitejs/vite/blob/8da04227d6f818a8ad9efc0056101968037c2e36/.github/workflows/ci.yml#L61)
|
||||
|
||||
@@ -908,11 +915,15 @@ See [inputs](#inputs) for more information.
|
||||
|
||||
* [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)
|
||||
|
||||

|
||||
* [qmk\_firmware uses tj-actions/changed-files to run linters](https://github.com/qmk/qmk_firmware/blob/7a737235ffd49c32d2c5561e8fe53fd96baa7f96/.github/workflows/lint.yml#L30)
|
||||
|
||||
And many more...
|
||||
|
||||
## Known Limitation
|
||||
### Scalability Example 📈
|
||||
|
||||

|
||||
|
||||
## Known Limitation ⚠️
|
||||
|
||||
> **Warning**
|
||||
>
|
||||
@@ -921,7 +932,7 @@ And many more...
|
||||
>
|
||||
> 
|
||||
|
||||
## Migration guide
|
||||
## Migration guide 🔄
|
||||
|
||||
With the switch from using grep's Extended regex to match files to the natively supported workflow glob pattern matching syntax introduced in [v13](https://github.com/tj-actions/changed-files/releases/tag/v13) you'll need to modify patterns used to match `files`.
|
||||
|
||||
@@ -941,7 +952,7 @@ With the switch from using grep's Extended regex to match files to the natively
|
||||
|
||||
* Free software: [MIT license](LICENSE)
|
||||
|
||||
## Credits
|
||||
## Credits 👏
|
||||
|
||||
This package was created with [cookiecutter-action](https://github.com/tj-actions/cookiecutter-action).
|
||||
|
||||
@@ -952,7 +963,7 @@ This package was created with [cookiecutter-action](https://github.com/tj-action
|
||||
* [tj-actions/demo3](https://github.com/tj-actions/demo3)
|
||||
* [tj-actions/release-tagger](https://github.com/tj-actions/release-tagger)
|
||||
|
||||
## Report Bugs
|
||||
## Report Bugs 🐛
|
||||
|
||||
Report bugs at https://github.com/tj-actions/changed-files/issues.
|
||||
|
||||
|
||||
12
action.yml
12
action.yml
@@ -136,6 +136,10 @@ inputs:
|
||||
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"
|
||||
fetch_additional_submodule_history:
|
||||
description: "Fetch additional history for submodules."
|
||||
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
|
||||
@@ -184,6 +188,14 @@ inputs:
|
||||
description: "Github API URL."
|
||||
required: false
|
||||
default: ${{ github.api_url }}
|
||||
fail_on_initial_diff_error:
|
||||
description: "Fail when the initial diff fails."
|
||||
required: false
|
||||
default: "false"
|
||||
fail_on_submodule_diff_error:
|
||||
description: "Fail when the submodule diff fails."
|
||||
required: false
|
||||
default: "false"
|
||||
|
||||
outputs:
|
||||
added_files:
|
||||
|
||||
250
dist/index.js
generated
vendored
250
dist/index.js
generated
vendored
@@ -82,6 +82,11 @@ const getRenamedFiles = ({ inputs, workingDirectory, hasSubmodule, diffResult, s
|
||||
sha2: submoduleShaResult.currentSha,
|
||||
diff
|
||||
}))) {
|
||||
let message = `Unable to use three dot diff for: ${submodulePath} submodule. Falling back to two dot diff. You can set 'fetch_additional_submodule_history: true' to fetch additional submodule history in order to use three dot diff`;
|
||||
if (inputs.fetchSubmoduleHistory) {
|
||||
message = `To fetch additional submodule history for: ${submodulePath} you can increase history depth using 'fetch_depth' input`;
|
||||
}
|
||||
core.info(message);
|
||||
diff = '..';
|
||||
}
|
||||
const submoduleRenamedFiles = yield (0, utils_1.gitRenamedFiles)({
|
||||
@@ -120,13 +125,14 @@ var ChangeTypeEnum;
|
||||
ChangeTypeEnum["Unmerged"] = "U";
|
||||
ChangeTypeEnum["Unknown"] = "X";
|
||||
})(ChangeTypeEnum || (exports.ChangeTypeEnum = ChangeTypeEnum = {}));
|
||||
const getAllDiffFiles = ({ workingDirectory, hasSubmodule, diffResult, submodulePaths, outputRenamedFilesAsDeletedAndAdded }) => __awaiter(void 0, void 0, void 0, function* () {
|
||||
const getAllDiffFiles = ({ workingDirectory, hasSubmodule, diffResult, submodulePaths, outputRenamedFilesAsDeletedAndAdded, fetchSubmoduleHistory, failOnInitialDiffError, failOnSubmoduleDiffError }) => __awaiter(void 0, void 0, void 0, function* () {
|
||||
const files = yield (0, utils_1.getAllChangedFiles)({
|
||||
cwd: workingDirectory,
|
||||
sha1: diffResult.previousSha,
|
||||
sha2: diffResult.currentSha,
|
||||
diff: diffResult.diff,
|
||||
outputRenamedFilesAsDeletedAndAdded
|
||||
outputRenamedFilesAsDeletedAndAdded,
|
||||
failOnInitialDiffError
|
||||
});
|
||||
if (hasSubmodule) {
|
||||
for (const submodulePath of submodulePaths) {
|
||||
@@ -146,6 +152,11 @@ const getAllDiffFiles = ({ workingDirectory, hasSubmodule, diffResult, submodule
|
||||
sha2: submoduleShaResult.currentSha,
|
||||
diff
|
||||
}))) {
|
||||
let message = `Set 'fetch_additional_submodule_history: true' to fetch additional submodule history for: ${submodulePath}`;
|
||||
if (fetchSubmoduleHistory) {
|
||||
message = `To fetch additional submodule history for: ${submodulePath} you can increase history depth using 'fetch_depth' input`;
|
||||
}
|
||||
core.warning(message);
|
||||
diff = '..';
|
||||
}
|
||||
const submoduleFiles = yield (0, utils_1.getAllChangedFiles)({
|
||||
@@ -155,7 +166,8 @@ const getAllDiffFiles = ({ workingDirectory, hasSubmodule, diffResult, submodule
|
||||
diff,
|
||||
isSubmodule: true,
|
||||
parentDir: submodulePath,
|
||||
outputRenamedFilesAsDeletedAndAdded
|
||||
outputRenamedFilesAsDeletedAndAdded,
|
||||
failOnSubmoduleDiffError
|
||||
});
|
||||
for (const changeType of Object.keys(submoduleFiles)) {
|
||||
if (!files[changeType]) {
|
||||
@@ -753,51 +765,66 @@ const getSHAForNonPullRequestEvent = (inputs, env, workingDirectory, isShallow,
|
||||
let targetBranch = env.GITHUB_REF_NAME;
|
||||
const currentBranch = targetBranch;
|
||||
let initialCommit = false;
|
||||
if (isShallow && !inputs.skipInitialFetch) {
|
||||
core.info('Repository is shallow, fetching more history...');
|
||||
if (isTag) {
|
||||
let sourceBranch = '';
|
||||
if (github.context.payload.base_ref) {
|
||||
sourceBranch = github.context.payload.base_ref.replace('refs/heads/', '');
|
||||
if (!inputs.skipInitialFetch) {
|
||||
if (isShallow) {
|
||||
core.info('Repository is shallow, fetching more history...');
|
||||
if (isTag) {
|
||||
let sourceBranch = '';
|
||||
if (github.context.payload.base_ref) {
|
||||
sourceBranch = github.context.payload.base_ref.replace('refs/heads/', '');
|
||||
}
|
||||
else if ((_h = github.context.payload.release) === null || _h === void 0 ? void 0 : _h.target_commitish) {
|
||||
sourceBranch = (_j = github.context.payload.release) === null || _j === void 0 ? void 0 : _j.target_commitish;
|
||||
}
|
||||
yield (0, utils_1.gitFetch)({
|
||||
cwd: workingDirectory,
|
||||
args: [
|
||||
...gitFetchExtraArgs,
|
||||
'-u',
|
||||
'--progress',
|
||||
`--deepen=${inputs.fetchDepth}`,
|
||||
'origin',
|
||||
`+refs/heads/${sourceBranch}:refs/remotes/origin/${sourceBranch}`
|
||||
]
|
||||
});
|
||||
}
|
||||
else if ((_h = github.context.payload.release) === null || _h === void 0 ? void 0 : _h.target_commitish) {
|
||||
sourceBranch = (_j = github.context.payload.release) === null || _j === void 0 ? void 0 : _j.target_commitish;
|
||||
else {
|
||||
yield (0, utils_1.gitFetch)({
|
||||
cwd: workingDirectory,
|
||||
args: [
|
||||
...gitFetchExtraArgs,
|
||||
'-u',
|
||||
'--progress',
|
||||
`--deepen=${inputs.fetchDepth}`,
|
||||
'origin',
|
||||
`+refs/heads/${targetBranch}:refs/remotes/origin/${targetBranch}`
|
||||
]
|
||||
});
|
||||
}
|
||||
if (hasSubmodule) {
|
||||
yield (0, utils_1.gitFetchSubmodules)({
|
||||
cwd: workingDirectory,
|
||||
args: [
|
||||
...gitFetchExtraArgs,
|
||||
'-u',
|
||||
'--progress',
|
||||
`--deepen=${inputs.fetchDepth}`
|
||||
]
|
||||
});
|
||||
}
|
||||
yield (0, utils_1.gitFetch)({
|
||||
cwd: workingDirectory,
|
||||
args: [
|
||||
...gitFetchExtraArgs,
|
||||
'-u',
|
||||
'--progress',
|
||||
`--deepen=${inputs.fetchDepth}`,
|
||||
'origin',
|
||||
`+refs/heads/${sourceBranch}:refs/remotes/origin/${sourceBranch}`
|
||||
]
|
||||
});
|
||||
}
|
||||
else {
|
||||
yield (0, utils_1.gitFetch)({
|
||||
cwd: workingDirectory,
|
||||
args: [
|
||||
...gitFetchExtraArgs,
|
||||
'-u',
|
||||
'--progress',
|
||||
`--deepen=${inputs.fetchDepth}`,
|
||||
'origin',
|
||||
`+refs/heads/${targetBranch}:refs/remotes/origin/${targetBranch}`
|
||||
]
|
||||
});
|
||||
}
|
||||
if (hasSubmodule) {
|
||||
yield (0, utils_1.gitFetchSubmodules)({
|
||||
cwd: workingDirectory,
|
||||
args: [
|
||||
...gitFetchExtraArgs,
|
||||
'-u',
|
||||
'--progress',
|
||||
`--deepen=${inputs.fetchDepth}`
|
||||
]
|
||||
});
|
||||
if (hasSubmodule && inputs.fetchSubmoduleHistory) {
|
||||
yield (0, utils_1.gitFetchSubmodules)({
|
||||
cwd: workingDirectory,
|
||||
args: [
|
||||
...gitFetchExtraArgs,
|
||||
'-u',
|
||||
'--progress',
|
||||
`--deepen=${inputs.fetchDepth}`
|
||||
]
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
const currentSha = yield getCurrentSHA({ inputs, workingDirectory });
|
||||
@@ -910,48 +937,63 @@ const getSHAForPullRequestEvent = (inputs, env, workingDirectory, isShallow, has
|
||||
if (inputs.sinceLastRemoteCommit) {
|
||||
targetBranch = currentBranch;
|
||||
}
|
||||
if (isShallow && !inputs.skipInitialFetch) {
|
||||
if (!inputs.skipInitialFetch) {
|
||||
core.info('Repository is shallow, fetching more history...');
|
||||
let prFetchExitCode = yield (0, utils_1.gitFetch)({
|
||||
cwd: workingDirectory,
|
||||
args: [
|
||||
...gitFetchExtraArgs,
|
||||
'-u',
|
||||
'--progress',
|
||||
'origin',
|
||||
`pull/${(_q = github.context.payload.pull_request) === null || _q === void 0 ? void 0 : _q.number}/head:${currentBranch}`
|
||||
]
|
||||
});
|
||||
if (prFetchExitCode !== 0) {
|
||||
prFetchExitCode = yield (0, utils_1.gitFetch)({
|
||||
if (isShallow) {
|
||||
let prFetchExitCode = yield (0, utils_1.gitFetch)({
|
||||
cwd: workingDirectory,
|
||||
args: [
|
||||
...gitFetchExtraArgs,
|
||||
'-u',
|
||||
'--progress',
|
||||
`--deepen=${inputs.fetchDepth}`,
|
||||
'origin',
|
||||
`+refs/heads/${currentBranch}*:refs/remotes/origin/${currentBranch}*`
|
||||
`pull/${(_q = github.context.payload.pull_request) === null || _q === void 0 ? void 0 : _q.number}/head:${currentBranch}`
|
||||
]
|
||||
});
|
||||
if (prFetchExitCode !== 0) {
|
||||
prFetchExitCode = yield (0, utils_1.gitFetch)({
|
||||
cwd: workingDirectory,
|
||||
args: [
|
||||
...gitFetchExtraArgs,
|
||||
'-u',
|
||||
'--progress',
|
||||
`--deepen=${inputs.fetchDepth}`,
|
||||
'origin',
|
||||
`+refs/heads/${currentBranch}*:refs/remotes/origin/${currentBranch}*`
|
||||
]
|
||||
});
|
||||
}
|
||||
if (prFetchExitCode !== 0) {
|
||||
throw new Error('Failed to fetch pull request branch. Please ensure "persist-credentials" is set to "true" when checking out the repository. See: https://github.com/actions/checkout#usage');
|
||||
}
|
||||
if (!inputs.sinceLastRemoteCommit) {
|
||||
core.debug('Fetching target branch...');
|
||||
yield (0, utils_1.gitFetch)({
|
||||
cwd: workingDirectory,
|
||||
args: [
|
||||
...gitFetchExtraArgs,
|
||||
'-u',
|
||||
'--progress',
|
||||
`--deepen=${inputs.fetchDepth}`,
|
||||
'origin',
|
||||
`+refs/heads/${targetBranch}:refs/remotes/origin/${targetBranch}`
|
||||
]
|
||||
});
|
||||
if (hasSubmodule) {
|
||||
yield (0, utils_1.gitFetchSubmodules)({
|
||||
cwd: workingDirectory,
|
||||
args: [
|
||||
...gitFetchExtraArgs,
|
||||
'-u',
|
||||
'--progress',
|
||||
`--deepen=${inputs.fetchDepth}`
|
||||
]
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
if (prFetchExitCode !== 0) {
|
||||
throw new Error('Failed to fetch pull request branch. Please ensure "persist-credentials" is set to "true" when checking out the repository. See: https://github.com/actions/checkout#usage');
|
||||
}
|
||||
if (!inputs.sinceLastRemoteCommit) {
|
||||
core.debug('Fetching target branch...');
|
||||
yield (0, utils_1.gitFetch)({
|
||||
cwd: workingDirectory,
|
||||
args: [
|
||||
...gitFetchExtraArgs,
|
||||
'-u',
|
||||
'--progress',
|
||||
`--deepen=${inputs.fetchDepth}`,
|
||||
'origin',
|
||||
`+refs/heads/${targetBranch}:refs/remotes/origin/${targetBranch}`
|
||||
]
|
||||
});
|
||||
if (hasSubmodule) {
|
||||
else {
|
||||
if (hasSubmodule && inputs.fetchSubmoduleHistory) {
|
||||
yield (0, utils_1.gitFetchSubmodules)({
|
||||
cwd: workingDirectory,
|
||||
args: [
|
||||
@@ -995,7 +1037,13 @@ const getSHAForPullRequestEvent = (inputs, env, workingDirectory, isShallow, has
|
||||
(previousSha &&
|
||||
(yield (0, utils_1.verifyCommitSha)({ sha: previousSha, cwd: workingDirectory })) !==
|
||||
0)) {
|
||||
core.warning('Unable to locate the remote branch head sha. Falling back to the previous commit in the local history.');
|
||||
if (github.context.payload.action &&
|
||||
github.context.payload.action === 'synchronize') {
|
||||
core.warning('Unable to locate the remote branch head sha. Falling back to the previous commit in the local history.');
|
||||
}
|
||||
else {
|
||||
core.info(`Unable to locate the remote branch head sha for ${github.context.eventName} (${github.context.payload.action}) events. Falling back to the previous commit in the local history.`);
|
||||
}
|
||||
previousSha = yield (0, utils_1.getParentSha)({
|
||||
cwd: workingDirectory
|
||||
});
|
||||
@@ -1288,6 +1336,15 @@ const getInputs = () => {
|
||||
const skipInitialFetch = core.getBooleanInput('skip_initial_fetch', {
|
||||
required: false
|
||||
});
|
||||
const fetchSubmoduleHistory = core.getBooleanInput('fetch_additional_submodule_history', {
|
||||
required: false
|
||||
});
|
||||
const failOnInitialDiffError = core.getBooleanInput('fail_on_initial_diff_error', {
|
||||
required: false
|
||||
});
|
||||
const failOnSubmoduleDiffError = core.getBooleanInput('fail_on_submodule_diff_error', {
|
||||
required: false
|
||||
});
|
||||
const inputs = {
|
||||
files,
|
||||
filesSeparator,
|
||||
@@ -1303,6 +1360,8 @@ const getInputs = () => {
|
||||
filesIgnoreYaml,
|
||||
filesIgnoreYamlFromSourceFile,
|
||||
filesIgnoreYamlFromSourceFileSeparator,
|
||||
failOnInitialDiffError,
|
||||
failOnSubmoduleDiffError,
|
||||
separator,
|
||||
// Not Supported via REST API
|
||||
sha,
|
||||
@@ -1323,6 +1382,7 @@ const getInputs = () => {
|
||||
oldNewSeparator,
|
||||
oldNewFilesSeparator,
|
||||
skipInitialFetch,
|
||||
fetchSubmoduleHistory,
|
||||
// End Not Supported via REST API
|
||||
dirNames,
|
||||
dirNamesExcludeCurrentDir,
|
||||
@@ -1496,7 +1556,10 @@ const getChangedFilesFromLocalGit = ({ inputs, env, workingDirectory, filePatter
|
||||
hasSubmodule,
|
||||
diffResult,
|
||||
submodulePaths,
|
||||
outputRenamedFilesAsDeletedAndAdded
|
||||
outputRenamedFilesAsDeletedAndAdded,
|
||||
fetchSubmoduleHistory: inputs.fetchSubmoduleHistory,
|
||||
failOnInitialDiffError: inputs.failOnInitialDiffError,
|
||||
failOnSubmoduleDiffError: inputs.failOnSubmoduleDiffError
|
||||
});
|
||||
core.debug(`All diff files: ${JSON.stringify(allDiffFiles)}`);
|
||||
core.info('All Done!');
|
||||
@@ -1596,7 +1659,8 @@ function run() {
|
||||
'recoverFiles',
|
||||
'recoverFilesIgnore',
|
||||
'includeAllOldNewRenamedFiles',
|
||||
'skipInitialFetch'
|
||||
'skipInitialFetch',
|
||||
'fetchSubmoduleHistory'
|
||||
];
|
||||
for (const input of unsupportedInputs) {
|
||||
if (inputs[input]) {
|
||||
@@ -2068,8 +2132,10 @@ exports.gitRenamedFiles = gitRenamedFiles;
|
||||
* @param isSubmodule - is the repo a submodule
|
||||
* @param parentDir - parent directory of the submodule
|
||||
* @param outputRenamedFilesAsDeletedAndAdded - output renamed files as deleted and added
|
||||
* @param failOnInitialDiffError - fail if the initial diff fails
|
||||
* @param failOnSubmoduleDiffError - fail if the submodule diff fails
|
||||
*/
|
||||
const getAllChangedFiles = ({ cwd, sha1, sha2, diff, isSubmodule = false, parentDir = '', outputRenamedFilesAsDeletedAndAdded = false }) => __awaiter(void 0, void 0, void 0, function* () {
|
||||
const getAllChangedFiles = ({ cwd, sha1, sha2, diff, isSubmodule = false, parentDir = '', outputRenamedFilesAsDeletedAndAdded = false, failOnInitialDiffError = false, failOnSubmoduleDiffError = false }) => __awaiter(void 0, void 0, void 0, function* () {
|
||||
const { exitCode, stdout, stderr } = yield exec.getExecOutput('git', [
|
||||
'diff',
|
||||
'--name-status',
|
||||
@@ -2091,6 +2157,14 @@ const getAllChangedFiles = ({ cwd, sha1, sha2, diff, isSubmodule = false, parent
|
||||
[changedFiles_1.ChangeTypeEnum.Unmerged]: [],
|
||||
[changedFiles_1.ChangeTypeEnum.Unknown]: []
|
||||
};
|
||||
if (exitCode !== 0) {
|
||||
if (failOnInitialDiffError && !isSubmodule) {
|
||||
throw new Error(`Failed to get changed files between: ${sha1}${diff}${sha2}: ${stderr}`);
|
||||
}
|
||||
else if (failOnSubmoduleDiffError && isSubmodule) {
|
||||
throw new Error(`Failed to get changed files for submodule between: ${sha1}${diff}${sha2}: ${stderr}`);
|
||||
}
|
||||
}
|
||||
if (exitCode !== 0) {
|
||||
if (isSubmodule) {
|
||||
core.warning(stderr ||
|
||||
@@ -2370,7 +2444,7 @@ const getFilePatterns = ({ inputs, workingDirectory }) => __awaiter(void 0, void
|
||||
else {
|
||||
const pathParts = pattern.split('/');
|
||||
const lastPart = pathParts[pathParts.length - 1];
|
||||
if (!lastPart.includes('.') && !lastPart.includes('*')) {
|
||||
if (!lastPart.includes('.')) {
|
||||
return `${pattern}/**`;
|
||||
}
|
||||
else {
|
||||
@@ -29551,6 +29625,7 @@ exports.Headers = Headers;
|
||||
exports.Request = Request;
|
||||
exports.Response = Response;
|
||||
exports.FetchError = FetchError;
|
||||
exports.AbortError = AbortError;
|
||||
|
||||
|
||||
/***/ }),
|
||||
@@ -37957,6 +38032,8 @@ function debug(logLevel, ...messages) {
|
||||
}
|
||||
function warn(logLevel, warning) {
|
||||
if (logLevel === 'debug' || logLevel === 'warn') {
|
||||
// https://github.com/typescript-eslint/typescript-eslint/issues/7478
|
||||
// eslint-disable-next-line @typescript-eslint/prefer-optional-chain
|
||||
if (typeof process !== 'undefined' && process.emitWarning)
|
||||
process.emitWarning(warning);
|
||||
else
|
||||
@@ -38738,7 +38815,7 @@ function stringifyKey(key, jsKey, ctx) {
|
||||
return '';
|
||||
if (typeof jsKey !== 'object')
|
||||
return String(jsKey);
|
||||
if (identity.isNode(key) && ctx && ctx.doc) {
|
||||
if (identity.isNode(key) && ctx?.doc) {
|
||||
const strCtx = stringify.createStringifyContext(ctx.doc, {});
|
||||
strCtx.anchors = new Set();
|
||||
for (const node of ctx.anchors.keys())
|
||||
@@ -42117,8 +42194,9 @@ function createPairs(schema, iterable, ctx) {
|
||||
key = keys[0];
|
||||
value = it[key];
|
||||
}
|
||||
else
|
||||
throw new TypeError(`Expected { key: value } tuple: ${it}`);
|
||||
else {
|
||||
throw new TypeError(`Expected tuple with one key, not ${keys.length} keys`);
|
||||
}
|
||||
}
|
||||
else {
|
||||
key = it;
|
||||
@@ -42793,7 +42871,7 @@ function stringifyFlowCollection({ comment, items }, ctx, { flowChars, itemInden
|
||||
if (iv.commentBefore)
|
||||
reqNewline = true;
|
||||
}
|
||||
else if (item.value == null && ik && ik.comment) {
|
||||
else if (item.value == null && ik?.comment) {
|
||||
comment = ik.comment;
|
||||
}
|
||||
}
|
||||
@@ -43419,7 +43497,7 @@ function blockString({ comment, type, value }, ctx, onComment, onChompKeep) {
|
||||
function plainString(item, ctx, onComment, onChompKeep) {
|
||||
const { type, value } = item;
|
||||
const { actualString, implicitKey, indent, indentStep, inFlow } = ctx;
|
||||
if ((implicitKey && /[\n[\]{},]/.test(value)) ||
|
||||
if ((implicitKey && value.includes('\n')) ||
|
||||
(inFlow && /[[\]{},]/.test(value))) {
|
||||
return quotedString(value, ctx);
|
||||
}
|
||||
|
||||
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
@@ -65,6 +65,11 @@ export const getRenamedFiles = async ({
|
||||
diff
|
||||
}))
|
||||
) {
|
||||
let message = `Unable to use three dot diff for: ${submodulePath} submodule. Falling back to two dot diff. You can set 'fetch_additional_submodule_history: true' to fetch additional submodule history in order to use three dot diff`
|
||||
if (inputs.fetchSubmoduleHistory) {
|
||||
message = `To fetch additional submodule history for: ${submodulePath} you can increase history depth using 'fetch_depth' input`
|
||||
}
|
||||
core.info(message)
|
||||
diff = '..'
|
||||
}
|
||||
|
||||
@@ -115,20 +120,27 @@ export const getAllDiffFiles = async ({
|
||||
hasSubmodule,
|
||||
diffResult,
|
||||
submodulePaths,
|
||||
outputRenamedFilesAsDeletedAndAdded
|
||||
outputRenamedFilesAsDeletedAndAdded,
|
||||
fetchSubmoduleHistory,
|
||||
failOnInitialDiffError,
|
||||
failOnSubmoduleDiffError
|
||||
}: {
|
||||
workingDirectory: string
|
||||
hasSubmodule: boolean
|
||||
diffResult: DiffResult
|
||||
submodulePaths: string[]
|
||||
outputRenamedFilesAsDeletedAndAdded: boolean
|
||||
fetchSubmoduleHistory: boolean
|
||||
failOnInitialDiffError: boolean
|
||||
failOnSubmoduleDiffError: boolean
|
||||
}): Promise<ChangedFiles> => {
|
||||
const files = await getAllChangedFiles({
|
||||
cwd: workingDirectory,
|
||||
sha1: diffResult.previousSha,
|
||||
sha2: diffResult.currentSha,
|
||||
diff: diffResult.diff,
|
||||
outputRenamedFilesAsDeletedAndAdded
|
||||
outputRenamedFilesAsDeletedAndAdded,
|
||||
failOnInitialDiffError
|
||||
})
|
||||
|
||||
if (hasSubmodule) {
|
||||
@@ -157,6 +169,11 @@ export const getAllDiffFiles = async ({
|
||||
diff
|
||||
}))
|
||||
) {
|
||||
let message = `Set 'fetch_additional_submodule_history: true' to fetch additional submodule history for: ${submodulePath}`
|
||||
if (fetchSubmoduleHistory) {
|
||||
message = `To fetch additional submodule history for: ${submodulePath} you can increase history depth using 'fetch_depth' input`
|
||||
}
|
||||
core.warning(message)
|
||||
diff = '..'
|
||||
}
|
||||
|
||||
@@ -167,7 +184,8 @@ export const getAllDiffFiles = async ({
|
||||
diff,
|
||||
isSubmodule: true,
|
||||
parentDir: submodulePath,
|
||||
outputRenamedFilesAsDeletedAndAdded
|
||||
outputRenamedFilesAsDeletedAndAdded,
|
||||
failOnSubmoduleDiffError
|
||||
})
|
||||
|
||||
for (const changeType of Object.keys(
|
||||
|
||||
210
src/commitSha.ts
210
src/commitSha.ts
@@ -93,56 +93,70 @@ export const getSHAForNonPullRequestEvent = async (
|
||||
const currentBranch = targetBranch
|
||||
let initialCommit = false
|
||||
|
||||
if (isShallow && !inputs.skipInitialFetch) {
|
||||
core.info('Repository is shallow, fetching more history...')
|
||||
if (!inputs.skipInitialFetch) {
|
||||
if (isShallow) {
|
||||
core.info('Repository is shallow, fetching more history...')
|
||||
|
||||
if (isTag) {
|
||||
let sourceBranch = ''
|
||||
if (isTag) {
|
||||
let sourceBranch = ''
|
||||
|
||||
if (github.context.payload.base_ref) {
|
||||
sourceBranch = github.context.payload.base_ref.replace(
|
||||
'refs/heads/',
|
||||
''
|
||||
)
|
||||
} else if (github.context.payload.release?.target_commitish) {
|
||||
sourceBranch = github.context.payload.release?.target_commitish
|
||||
if (github.context.payload.base_ref) {
|
||||
sourceBranch = github.context.payload.base_ref.replace(
|
||||
'refs/heads/',
|
||||
''
|
||||
)
|
||||
} else if (github.context.payload.release?.target_commitish) {
|
||||
sourceBranch = github.context.payload.release?.target_commitish
|
||||
}
|
||||
|
||||
await gitFetch({
|
||||
cwd: workingDirectory,
|
||||
args: [
|
||||
...gitFetchExtraArgs,
|
||||
'-u',
|
||||
'--progress',
|
||||
`--deepen=${inputs.fetchDepth}`,
|
||||
'origin',
|
||||
`+refs/heads/${sourceBranch}:refs/remotes/origin/${sourceBranch}`
|
||||
]
|
||||
})
|
||||
} else {
|
||||
await gitFetch({
|
||||
cwd: workingDirectory,
|
||||
args: [
|
||||
...gitFetchExtraArgs,
|
||||
'-u',
|
||||
'--progress',
|
||||
`--deepen=${inputs.fetchDepth}`,
|
||||
'origin',
|
||||
`+refs/heads/${targetBranch}:refs/remotes/origin/${targetBranch}`
|
||||
]
|
||||
})
|
||||
}
|
||||
|
||||
await gitFetch({
|
||||
cwd: workingDirectory,
|
||||
args: [
|
||||
...gitFetchExtraArgs,
|
||||
'-u',
|
||||
'--progress',
|
||||
`--deepen=${inputs.fetchDepth}`,
|
||||
'origin',
|
||||
`+refs/heads/${sourceBranch}:refs/remotes/origin/${sourceBranch}`
|
||||
]
|
||||
})
|
||||
if (hasSubmodule) {
|
||||
await gitFetchSubmodules({
|
||||
cwd: workingDirectory,
|
||||
args: [
|
||||
...gitFetchExtraArgs,
|
||||
'-u',
|
||||
'--progress',
|
||||
`--deepen=${inputs.fetchDepth}`
|
||||
]
|
||||
})
|
||||
}
|
||||
} else {
|
||||
await gitFetch({
|
||||
cwd: workingDirectory,
|
||||
args: [
|
||||
...gitFetchExtraArgs,
|
||||
'-u',
|
||||
'--progress',
|
||||
`--deepen=${inputs.fetchDepth}`,
|
||||
'origin',
|
||||
`+refs/heads/${targetBranch}:refs/remotes/origin/${targetBranch}`
|
||||
]
|
||||
})
|
||||
}
|
||||
|
||||
if (hasSubmodule) {
|
||||
await gitFetchSubmodules({
|
||||
cwd: workingDirectory,
|
||||
args: [
|
||||
...gitFetchExtraArgs,
|
||||
'-u',
|
||||
'--progress',
|
||||
`--deepen=${inputs.fetchDepth}`
|
||||
]
|
||||
})
|
||||
if (hasSubmodule && inputs.fetchSubmoduleHistory) {
|
||||
await gitFetchSubmodules({
|
||||
cwd: workingDirectory,
|
||||
args: [
|
||||
...gitFetchExtraArgs,
|
||||
'-u',
|
||||
'--progress',
|
||||
`--deepen=${inputs.fetchDepth}`
|
||||
]
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -288,55 +302,68 @@ export const getSHAForPullRequestEvent = async (
|
||||
targetBranch = currentBranch
|
||||
}
|
||||
|
||||
if (isShallow && !inputs.skipInitialFetch) {
|
||||
if (!inputs.skipInitialFetch) {
|
||||
core.info('Repository is shallow, fetching more history...')
|
||||
|
||||
let prFetchExitCode = await gitFetch({
|
||||
cwd: workingDirectory,
|
||||
args: [
|
||||
...gitFetchExtraArgs,
|
||||
'-u',
|
||||
'--progress',
|
||||
'origin',
|
||||
`pull/${github.context.payload.pull_request?.number}/head:${currentBranch}`
|
||||
]
|
||||
})
|
||||
|
||||
if (prFetchExitCode !== 0) {
|
||||
prFetchExitCode = await gitFetch({
|
||||
if (isShallow) {
|
||||
let prFetchExitCode = await gitFetch({
|
||||
cwd: workingDirectory,
|
||||
args: [
|
||||
...gitFetchExtraArgs,
|
||||
'-u',
|
||||
'--progress',
|
||||
`--deepen=${inputs.fetchDepth}`,
|
||||
'origin',
|
||||
`+refs/heads/${currentBranch}*:refs/remotes/origin/${currentBranch}*`
|
||||
]
|
||||
})
|
||||
}
|
||||
|
||||
if (prFetchExitCode !== 0) {
|
||||
throw new Error(
|
||||
'Failed to fetch pull request branch. Please ensure "persist-credentials" is set to "true" when checking out the repository. See: https://github.com/actions/checkout#usage'
|
||||
)
|
||||
}
|
||||
|
||||
if (!inputs.sinceLastRemoteCommit) {
|
||||
core.debug('Fetching target branch...')
|
||||
await gitFetch({
|
||||
cwd: workingDirectory,
|
||||
args: [
|
||||
...gitFetchExtraArgs,
|
||||
'-u',
|
||||
'--progress',
|
||||
`--deepen=${inputs.fetchDepth}`,
|
||||
'origin',
|
||||
`+refs/heads/${targetBranch}:refs/remotes/origin/${targetBranch}`
|
||||
`pull/${github.context.payload.pull_request?.number}/head:${currentBranch}`
|
||||
]
|
||||
})
|
||||
|
||||
if (hasSubmodule) {
|
||||
if (prFetchExitCode !== 0) {
|
||||
prFetchExitCode = await gitFetch({
|
||||
cwd: workingDirectory,
|
||||
args: [
|
||||
...gitFetchExtraArgs,
|
||||
'-u',
|
||||
'--progress',
|
||||
`--deepen=${inputs.fetchDepth}`,
|
||||
'origin',
|
||||
`+refs/heads/${currentBranch}*:refs/remotes/origin/${currentBranch}*`
|
||||
]
|
||||
})
|
||||
}
|
||||
|
||||
if (prFetchExitCode !== 0) {
|
||||
throw new Error(
|
||||
'Failed to fetch pull request branch. Please ensure "persist-credentials" is set to "true" when checking out the repository. See: https://github.com/actions/checkout#usage'
|
||||
)
|
||||
}
|
||||
|
||||
if (!inputs.sinceLastRemoteCommit) {
|
||||
core.debug('Fetching target branch...')
|
||||
await gitFetch({
|
||||
cwd: workingDirectory,
|
||||
args: [
|
||||
...gitFetchExtraArgs,
|
||||
'-u',
|
||||
'--progress',
|
||||
`--deepen=${inputs.fetchDepth}`,
|
||||
'origin',
|
||||
`+refs/heads/${targetBranch}:refs/remotes/origin/${targetBranch}`
|
||||
]
|
||||
})
|
||||
|
||||
if (hasSubmodule) {
|
||||
await gitFetchSubmodules({
|
||||
cwd: workingDirectory,
|
||||
args: [
|
||||
...gitFetchExtraArgs,
|
||||
'-u',
|
||||
'--progress',
|
||||
`--deepen=${inputs.fetchDepth}`
|
||||
]
|
||||
})
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (hasSubmodule && inputs.fetchSubmoduleHistory) {
|
||||
await gitFetchSubmodules({
|
||||
cwd: workingDirectory,
|
||||
args: [
|
||||
@@ -395,9 +422,18 @@ export const getSHAForPullRequestEvent = async (
|
||||
(await verifyCommitSha({sha: previousSha, cwd: workingDirectory})) !==
|
||||
0)
|
||||
) {
|
||||
core.warning(
|
||||
'Unable to locate the remote branch head sha. Falling back to the previous commit in the local history.'
|
||||
)
|
||||
if (
|
||||
github.context.payload.action &&
|
||||
github.context.payload.action === 'synchronize'
|
||||
) {
|
||||
core.warning(
|
||||
'Unable to locate the remote branch head sha. Falling back to the previous commit in the local history.'
|
||||
)
|
||||
} else {
|
||||
core.info(
|
||||
`Unable to locate the remote branch head sha for ${github.context.eventName} (${github.context.payload.action}) events. Falling back to the previous commit in the local history.`
|
||||
)
|
||||
}
|
||||
previousSha = await getParentSha({
|
||||
cwd: workingDirectory
|
||||
})
|
||||
|
||||
@@ -34,6 +34,7 @@ export type Inputs = {
|
||||
json: boolean
|
||||
escapeJson: boolean
|
||||
fetchDepth?: number
|
||||
fetchSubmoduleHistory: boolean
|
||||
sinceLastRemoteCommit: boolean
|
||||
writeOutputFiles: boolean
|
||||
outputDir: string
|
||||
@@ -47,6 +48,8 @@ export type Inputs = {
|
||||
token: string
|
||||
apiUrl: string
|
||||
skipInitialFetch: boolean
|
||||
failOnInitialDiffError: boolean
|
||||
failOnSubmoduleDiffError: boolean
|
||||
}
|
||||
|
||||
export const getInputs = (): Inputs => {
|
||||
@@ -189,6 +192,24 @@ export const getInputs = (): Inputs => {
|
||||
const skipInitialFetch = core.getBooleanInput('skip_initial_fetch', {
|
||||
required: false
|
||||
})
|
||||
const fetchSubmoduleHistory = core.getBooleanInput(
|
||||
'fetch_additional_submodule_history',
|
||||
{
|
||||
required: false
|
||||
}
|
||||
)
|
||||
const failOnInitialDiffError = core.getBooleanInput(
|
||||
'fail_on_initial_diff_error',
|
||||
{
|
||||
required: false
|
||||
}
|
||||
)
|
||||
const failOnSubmoduleDiffError = core.getBooleanInput(
|
||||
'fail_on_submodule_diff_error',
|
||||
{
|
||||
required: false
|
||||
}
|
||||
)
|
||||
|
||||
const inputs: Inputs = {
|
||||
files,
|
||||
@@ -205,6 +226,8 @@ export const getInputs = (): Inputs => {
|
||||
filesIgnoreYaml,
|
||||
filesIgnoreYamlFromSourceFile,
|
||||
filesIgnoreYamlFromSourceFileSeparator,
|
||||
failOnInitialDiffError,
|
||||
failOnSubmoduleDiffError,
|
||||
separator,
|
||||
// Not Supported via REST API
|
||||
sha,
|
||||
@@ -225,6 +248,7 @@ export const getInputs = (): Inputs => {
|
||||
oldNewSeparator,
|
||||
oldNewFilesSeparator,
|
||||
skipInitialFetch,
|
||||
fetchSubmoduleHistory,
|
||||
// End Not Supported via REST API
|
||||
dirNames,
|
||||
dirNamesExcludeCurrentDir,
|
||||
|
||||
@@ -190,7 +190,10 @@ const getChangedFilesFromLocalGit = async ({
|
||||
hasSubmodule,
|
||||
diffResult,
|
||||
submodulePaths,
|
||||
outputRenamedFilesAsDeletedAndAdded
|
||||
outputRenamedFilesAsDeletedAndAdded,
|
||||
fetchSubmoduleHistory: inputs.fetchSubmoduleHistory,
|
||||
failOnInitialDiffError: inputs.failOnInitialDiffError,
|
||||
failOnSubmoduleDiffError: inputs.failOnSubmoduleDiffError
|
||||
})
|
||||
core.debug(`All diff files: ${JSON.stringify(allDiffFiles)}`)
|
||||
core.info('All Done!')
|
||||
@@ -317,7 +320,8 @@ export async function run(): Promise<void> {
|
||||
'recoverFiles',
|
||||
'recoverFilesIgnore',
|
||||
'includeAllOldNewRenamedFiles',
|
||||
'skipInitialFetch'
|
||||
'skipInitialFetch',
|
||||
'fetchSubmoduleHistory'
|
||||
]
|
||||
|
||||
for (const input of unsupportedInputs) {
|
||||
|
||||
22
src/utils.ts
22
src/utils.ts
@@ -490,6 +490,8 @@ export const gitRenamedFiles = async ({
|
||||
* @param isSubmodule - is the repo a submodule
|
||||
* @param parentDir - parent directory of the submodule
|
||||
* @param outputRenamedFilesAsDeletedAndAdded - output renamed files as deleted and added
|
||||
* @param failOnInitialDiffError - fail if the initial diff fails
|
||||
* @param failOnSubmoduleDiffError - fail if the submodule diff fails
|
||||
*/
|
||||
export const getAllChangedFiles = async ({
|
||||
cwd,
|
||||
@@ -498,7 +500,9 @@ export const getAllChangedFiles = async ({
|
||||
diff,
|
||||
isSubmodule = false,
|
||||
parentDir = '',
|
||||
outputRenamedFilesAsDeletedAndAdded = false
|
||||
outputRenamedFilesAsDeletedAndAdded = false,
|
||||
failOnInitialDiffError = false,
|
||||
failOnSubmoduleDiffError = false
|
||||
}: {
|
||||
cwd: string
|
||||
sha1: string
|
||||
@@ -507,6 +511,8 @@ export const getAllChangedFiles = async ({
|
||||
isSubmodule?: boolean
|
||||
parentDir?: string
|
||||
outputRenamedFilesAsDeletedAndAdded?: boolean
|
||||
failOnInitialDiffError?: boolean
|
||||
failOnSubmoduleDiffError?: boolean
|
||||
}): Promise<ChangedFiles> => {
|
||||
const {exitCode, stdout, stderr} = await exec.getExecOutput(
|
||||
'git',
|
||||
@@ -534,6 +540,18 @@ export const getAllChangedFiles = async ({
|
||||
[ChangeTypeEnum.Unknown]: []
|
||||
}
|
||||
|
||||
if (exitCode !== 0) {
|
||||
if (failOnInitialDiffError && !isSubmodule) {
|
||||
throw new Error(
|
||||
`Failed to get changed files between: ${sha1}${diff}${sha2}: ${stderr}`
|
||||
)
|
||||
} else if (failOnSubmoduleDiffError && isSubmodule) {
|
||||
throw new Error(
|
||||
`Failed to get changed files for submodule between: ${sha1}${diff}${sha2}: ${stderr}`
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
if (exitCode !== 0) {
|
||||
if (isSubmodule) {
|
||||
core.warning(
|
||||
@@ -979,7 +997,7 @@ export const getFilePatterns = async ({
|
||||
} else {
|
||||
const pathParts = pattern.split('/')
|
||||
const lastPart = pathParts[pathParts.length - 1]
|
||||
if (!lastPart.includes('.') && !lastPart.includes('*')) {
|
||||
if (!lastPart.includes('.')) {
|
||||
return `${pattern}/**`
|
||||
} else {
|
||||
return pattern
|
||||
|
||||
Submodule test/demo updated: e168fac86c...5dfac2e9a7
Reference in New Issue
Block a user