Compare commits

...

129 Commits

Author SHA1 Message Date
Tonye Jack
3f54ebb830 chore: update formatting and add missing dist changes (#1940) 2024-02-17 20:20:58 -07:00
tj-actions[bot]
6f070cff38 Upgraded to v42.0.3 (#1939)
Co-authored-by: jackton1 <17484350+jackton1@users.noreply.github.com>
Co-authored-by: GitHub Action <action@github.com>
2024-02-17 22:43:08 +00:00
tj-actions[bot]
ec75ae5ab7 Updated README.md (#1938)
Co-authored-by: jackton1 <17484350+jackton1@users.noreply.github.com>
2024-02-17 15:32:19 -07:00
allcontributors[bot]
4333ab5b20 docs: add codesculpture as a contributor for code, and bug (#1937)
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2024-02-17 15:31:24 -07:00
Aravind
e3cac49049 fix(payload_api, git_diff): Accessing correct property in payload and Replacing --quiet with --no-patch in git diff (#1934) 2024-02-17 15:31:02 -07:00
renovate[bot]
68bd4537bd chore(deps): update github artifact actions to v4 (major) (#1936)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-17 13:36:07 +00:00
renovate[bot]
f0ce41b71c chore(deps): update dependency eslint-plugin-jest to v27.9.0 2024-02-16 19:21:56 +00:00
renovate[bot]
ce451bf430 chore(deps): update dependency @types/node to v20.11.19 2024-02-15 19:08:56 +00:00
renovate[bot]
7592e9e855 chore(deps): update dependency @types/node to v20.11.18 2024-02-15 14:12:15 +00:00
renovate[bot]
999653c672 chore(deps): lock file maintenance 2024-02-13 21:04:48 +00:00
renovate[bot]
6cf4c21fdf chore(deps): update dependency eslint-plugin-jest to v27.8.0 2024-02-13 18:16:15 +00:00
Tonye Jack
09ee51bee3 chore: update codacy-analysis.yml (#1929) 2024-02-13 16:34:23 +00:00
Tonye Jack
8eced8a5df Update README.md 2024-02-13 09:20:59 -07:00
renovate[bot]
13fa1402a7 chore(deps): update typescript-eslint monorepo to v7 (major) (#1927)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-12 22:21:01 +00:00
GitHub Action
07ac0ac168 Added missing changes and modified dist assets. 2024-02-12 01:14:37 +00:00
renovate[bot]
049d7fd639 chore(deps): lock file maintenance 2024-02-12 01:14:37 +00:00
renovate[bot]
2e90fbb74b chore(deps): update dependency @types/node to v20.11.17 2024-02-08 21:32:12 +00:00
renovate[bot]
2a9db54a6d chore(deps): update codacy/codacy-analysis-cli-action action to v4.4.0 2024-02-08 16:41:50 +00:00
renovate[bot]
d0d5671ef7 chore(deps): update actions/setup-node action to v4.0.2 2024-02-07 05:44:30 +00:00
Tonye Jack
97120ff1f5 chore: update README.md (#1922) 2024-02-06 22:33:30 -07:00
Tonye Jack
b2d4e1b488 Update README.md 2024-02-06 20:33:25 -07:00
Tonye Jack
9299962a59 chore: update workflow-run-example.yml (#1921) 2024-02-06 20:29:12 -07:00
KeisukeYamashita
ea35f7ea00 fix: broken link to matrix example workflow (#1918)
Co-authored-by: Tonye Jack <jtonye@ymail.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2024-02-06 20:18:39 -07:00
tj-actions[bot]
3399f8837f Updated README.md (#1920)
Co-authored-by: jackton1 <17484350+jackton1@users.noreply.github.com>
2024-02-06 16:50:49 -07:00
allcontributors[bot]
ac897da4f1 docs: add KeisukeYamashita as a contributor for doc (#1919)
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2024-02-06 16:48:51 -07:00
tj-actions[bot]
8e56bc097a Updated README.md (#1917)
Co-authored-by: jackton1 <17484350+jackton1@users.noreply.github.com>
2024-02-05 19:51:58 +00:00
Tonye Jack
f6d3fe5179 Update action.yml 2024-02-05 12:42:54 -07:00
Tonye Jack
efa99ea361 Update README.md 2024-02-05 12:38:05 -07:00
Tonye Jack
6d8f9bd379 Update README.md 2024-02-05 12:34:02 -07:00
renovate[bot]
589fb70c81 chore(deps): update typescript-eslint monorepo to v6.21.0 2024-02-05 19:18:51 +00:00
tj-actions[bot]
7daee9e7cf Updated README.md (#1915)
Co-authored-by: jackton1 <17484350+jackton1@users.noreply.github.com>
2024-02-05 05:03:52 +00:00
Tonye Jack
99c80bdd47 Update README.md 2024-02-04 21:55:53 -07:00
renovate[bot]
5e7cbf5fdb chore(deps): update dependency prettier to v3.2.5 2024-02-04 06:22:00 +00:00
renovate[bot]
b4d6d28988 chore(deps): lock file maintenance 2024-02-04 04:15:55 +00:00
renovate[bot]
8370e6e6ef chore(deps): update tj-actions/verify-changed-files action to v18 (#1912)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-03 23:01:22 +00:00
tj-actions[bot]
aa31060851 Updated README.md (#1911)
Co-authored-by: jackton1 <17484350+jackton1@users.noreply.github.com>
2024-02-02 06:23:08 -07:00
Daniel Hill
54c56103aa correct bash loop in examples (#1908)
Co-authored-by: Tonye Jack <jtonye@ymail.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2024-02-02 06:21:28 -07:00
allcontributors[bot]
e57fb1b8eb docs: add dan-hill2802 as a contributor for doc (#1910)
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2024-02-02 06:20:26 -07:00
Tonye Jack
926735a61e chore: create greetings workflow (#1909) 2024-02-02 13:15:54 +00:00
Tonye Jack
d3ac2a064b Update README.md 2024-02-02 05:26:23 -07:00
renovate[bot]
91df40b882 chore(deps): update dependency @types/node to v20.11.16 2024-02-02 00:55:22 +00:00
renovate[bot]
28396e9658 chore(deps): update dependency @types/jest to v29.5.12 2024-02-01 21:32:44 +00:00
renovate[bot]
3a66e2a7e4 chore(deps): update dependency @types/node to v20.11.15 2024-02-01 14:05:35 +00:00
renovate[bot]
35f3202fd5 chore(deps): update dependency @types/node to v20.11.14 2024-01-31 23:17:50 +00:00
renovate[bot]
2b30af482a chore(deps): update peter-evans/create-pull-request action to v6 (#1903)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-31 13:06:56 +00:00
renovate[bot]
a93bcf46e0 chore(deps): update dependency @types/node to v20.11.13 2024-01-31 00:55:34 +00:00
renovate[bot]
6d4c555c7d chore(deps): update dependency @types/node to v20.11.12 2024-01-30 22:58:15 +00:00
renovate[bot]
507a8c703d chore(deps): update dependency @types/node to v20.11.11 2024-01-30 20:28:06 +00:00
Tonye Jack
3a7052c24a chore: update test (#1899) 2024-01-30 15:58:53 +00:00
renovate[bot]
782eb123a9 chore(deps): update typescript-eslint monorepo to v6.20.0 2024-01-29 17:33:03 +00:00
renovate[bot]
9134dac8f6 chore(deps): lock file maintenance 2024-01-29 02:23:13 +00:00
tj-actions[bot]
df12603b45 Updated README.md (#1896)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2024-01-28 23:00:58 +00:00
allcontributors[bot]
bb9b5e8363 docs: add levenleven as a contributor for doc (#1893)
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2024-01-28 15:53:00 -07:00
tj-actions[bot]
31b9c0a541 Updated README.md (#1894)
Co-authored-by: renovate[bot] <renovate[bot]@users.noreply.github.com>
2024-01-28 20:24:30 +00:00
renovate[bot]
ba0a561b13 chore(deps): update dependency @types/node to v20.11.10 2024-01-28 20:15:14 +00:00
Aleksey Levenstein
8d35cbb00f chore: fix broken matrix example links (#1891)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2024-01-28 20:02:05 +00:00
renovate[bot]
82dd6547dc chore(deps): update dependency @types/node to v20.11.9 2024-01-28 11:16:18 +00:00
renovate[bot]
6d42539842 chore(deps): lock file maintenance 2024-01-28 02:15:30 +00:00
renovate[bot]
08dedfb681 chore(deps): update dependency @types/node to v20.11.8 2024-01-27 16:43:26 +00:00
renovate[bot]
f6d9fa10e0 chore(deps): update dependency @types/node to v20.11.7 2024-01-26 07:40:09 +00:00
renovate[bot]
9eb0d763ae chore(deps): update dependency @types/uuid to v9.0.8 2024-01-26 01:13:50 +00:00
tj-actions[bot]
51d2f88f07 Upgraded to v42.0.2 (#1886)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2024-01-25 19:37:33 +00:00
Tonye Jack
90a06d6ba9 feat: enhance error handling for non-git directories (#1885)
Co-authored-by: GitHub Action <action@github.com>
2024-01-25 18:46:48 +00:00
tj-actions[bot]
2cb2c9234e Upgraded to v42.0.1 (#1884)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2024-01-24 22:06:48 -07:00
renovate[bot]
ac21d93904 chore(deps): update dependency @types/node to v20.11.6 2024-01-24 08:44:11 +00:00
renovate[bot]
a4637ea6e7 chore(deps): update typescript-eslint monorepo to v6.19.1 2024-01-22 19:25:19 +00:00
renovate[bot]
fd9998cf5f chore(deps): update dependency ts-jest to v29.1.2 2024-01-22 16:38:49 +00:00
GitHub Action
ea024b2d7f Added missing changes and modified dist assets. 2024-01-22 00:53:04 +00:00
renovate[bot]
db4e584844 chore(deps): lock file maintenance 2024-01-22 00:53:04 +00:00
Tonye Jack
c6543c497a chore: rename example worflows from test to example (#1878) 2024-01-21 05:54:00 +00:00
Tonye Jack
88f9f3efbb chore: update README.md (#1877) 2024-01-20 21:42:48 -07:00
GitHub Action
3af07c2040 Added missing changes and modified dist assets. 2024-01-18 05:49:14 +00:00
Tonye Jack
3680129aa2 Update env.ts 2024-01-18 05:49:14 +00:00
renovate[bot]
5d866cbe77 chore(deps): lock file maintenance 2024-01-18 05:49:14 +00:00
renovate[bot]
346f237a17 chore(deps): update tj-actions/eslint-changed-files action to v23 (#1875)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-18 05:36:12 +00:00
tj-actions[bot]
c037f1e7c5 Upgraded to v42 (#1874)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2024-01-18 05:12:24 +00:00
Tonye Jack
ae82ed4ae0 feat: add support for include/exclude all nested files when a directory is specified and ends with a slash (#1873)
Co-authored-by: GitHub Action <action@github.com>
2024-01-17 21:57:33 -07:00
Tonye Jack
cbd59070e8 rename: unsupported REST API inputs constant name (#1872) 2024-01-18 03:39:20 +00:00
Tonye Jack
6c9dcea443 fix: update input warning (#1870)
Co-authored-by: tj-actions[bot] <109116665+tj-actions-bot@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: GitHub Action <action@github.com>
2024-01-17 20:27:20 -07:00
renovate[bot]
79b060d445 chore(deps): update dependency prettier to v3.2.4 2024-01-17 11:20:13 +00:00
tj-actions[bot]
434b67ebc3 Upgraded to v41.1.2 (#1869)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2024-01-17 01:02:16 -07:00
renovate[bot]
cbda684547 chore(deps): update dependency @types/node to v20.11.5 2024-01-17 07:29:39 +00:00
Tonye Jack
3f8189989b fix: bug with incorrect action path (#1866)
Co-authored-by: GitHub Action <action@github.com>
2024-01-17 07:20:30 +00:00
renovate[bot]
67a1f54f6f chore(deps): update dependency prettier to v3.2.3 2024-01-17 05:17:08 +00:00
renovate[bot]
99248a4438 chore(deps): update tj-actions/eslint-changed-files action to v22 (#1864)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-16 22:31:01 +00:00
renovate[bot]
878743189b chore(deps): update dependency @types/node to v20.11.4 2024-01-16 11:36:30 +00:00
renovate[bot]
98d1d84e2f chore(deps): update dependency @types/node to v20.11.3 2024-01-15 22:18:38 +00:00
Tonye Jack
a60bf3759e feat: enhance error handling and working directory resolution (#1859)
Co-authored-by: GitHub Action <action@github.com>
2024-01-15 11:54:08 -07:00
renovate[bot]
bc46e4c422 chore(deps): update typescript-eslint monorepo to v6.19.0 2024-01-15 18:51:11 +00:00
renovate[bot]
fba4067348 chore(deps): update dependency @types/node to v20.11.2 2024-01-15 13:13:53 +00:00
renovate[bot]
e4b8674732 chore(deps): update dependency @types/node to v20.11.1 2024-01-15 04:26:58 +00:00
renovate[bot]
bc2b5aef20 chore(deps): lock file maintenance 2024-01-15 02:09:33 +00:00
renovate[bot]
63c36a563a chore(deps): update dependency prettier to v3.2.2 2024-01-14 05:44:42 +00:00
tj-actions[bot]
44b77505fe Upgraded to v41.1.1 (#1854)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2024-01-13 22:07:22 +00:00
Tonye Jack
62f4729b5d fix: bug with inaccurate warnings (#1853)
Co-authored-by: GitHub Action <action@github.com>
2024-01-13 21:53:17 +00:00
tj-actions[bot]
e0579abf95 Upgraded to v41.1.0 (#1852)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2024-01-13 10:27:11 +00:00
Tonye Jack
8e0194b29b fix: permission with release workflow (#1851) 2024-01-13 03:16:09 -07:00
tj-actions[bot]
3649d2842d Updated README.md (#1850)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2024-01-13 08:58:40 +00:00
Tonye Jack
0ca1c07b47 feat: add support for forcing the use of GitHub’s REST API (#1849)
Co-authored-by: GitHub Action <action@github.com>
2024-01-13 08:48:42 +00:00
Tonye Jack
a57f4dcc81 chore: update top level workflow permissions (#1848) 2024-01-13 07:31:45 +00:00
renovate[bot]
9c39b0b6e9 chore(deps): update dependency prettier to v3.2.1 2024-01-12 23:37:28 +00:00
renovate[bot]
8b141f3906 chore(deps): update dependency eslint-plugin-jest to v27.6.3 2024-01-12 17:54:52 +00:00
Tonye Jack
17e07d8bc0 chore: create multi-job-test.yml (#1843)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2024-01-12 17:43:51 +00:00
Tonye Jack
13fa1c06fc chore: update warning message (#1845)
Co-authored-by: GitHub Action <action@github.com>
2024-01-12 10:28:21 -07:00
renovate[bot]
0deb29d192 chore(deps): update dependency prettier to v3.2.0 2024-01-12 17:07:01 +00:00
renovate[bot]
28267ee8b7 chore(deps): update dependency @types/node to v20.11.0 2024-01-11 08:04:44 +00:00
renovate[bot]
094d3441f8 chore(deps): update dependency eslint-plugin-jest to v27.6.2 2024-01-10 11:27:40 +00:00
renovate[bot]
aeec36b035 chore(deps): update dependency eslint-plugin-prettier to v5.1.3 2024-01-10 05:05:32 +00:00
dependabot[bot]
2d0270c489 chore(deps-dev): bump @types/node from 20.10.7 to 20.10.8 (#1836)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-10 01:23:30 +00:00
renovate[bot]
0e0adfa0d3 chore(deps): update typescript-eslint monorepo to v6.18.1 2024-01-09 01:42:46 +00:00
Tonye Jack
5313e6bbe3 chore: update jest.config.js (#1834) 2024-01-08 13:53:44 +00:00
renovate[bot]
54789be3a1 chore(deps): lock file maintenance 2024-01-08 00:42:20 +00:00
renovate[bot]
1675238cfd chore(deps): update dependency @types/node to v20.10.7 2024-01-07 17:13:54 +00:00
tj-actions[bot]
3fbf5fb588 Updated README.md (#1830)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2024-01-07 06:40:56 -07:00
Tonye Jack
95230678db Update README.md 2024-01-07 06:37:07 -07:00
Tonye Jack
fdccafbb6e chore: create workflow-run-test.yml (#1828) 2024-01-06 10:50:54 -07:00
renovate[bot]
0e8d796ee0 chore(deps): update typescript-eslint monorepo to v6.18.0 2024-01-06 16:49:14 +00:00
renovate[bot]
0c6f2ac488 chore(deps): update dependency eslint-plugin-jest to v27.6.1 2024-01-01 22:49:49 +00:00
renovate[bot]
1db97adba4 chore(deps): update typescript-eslint monorepo to v6.17.0 2024-01-01 19:03:11 +00:00
renovate[bot]
fb8f6db383 chore(deps): lock file maintenance 2023-12-31 19:28:53 +00:00
renovate[bot]
efd7ecef11 chore(deps): update dependency @types/node to v20.10.6 2023-12-30 02:47:54 +00:00
renovate[bot]
4f8e12c098 chore(deps): update tj-actions/verify-changed-files action to v17 (#1820)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-29 04:36:04 +00:00
Tonye Jack
032add13e8 Update README.md 2023-12-28 11:36:43 -07:00
renovate[bot]
0f0747e79d chore(deps): update typescript-eslint monorepo to v6.16.0 2023-12-25 20:16:19 +00:00
Tonye Jack
0c2a758b81 chore: update matrix-test.yml (#1814) 2023-12-24 18:06:18 +00:00
tj-actions[bot]
1b6d7b6fb6 Upgraded to v41.0.1 (#1816)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2023-12-24 17:48:54 +00:00
Tonye Jack
716b1e1304 fix: update characters escaped by safe output (#1815) 2023-12-24 16:32:32 +00:00
renovate[bot]
7aaf10d9ee chore(deps): update dependency eslint-plugin-prettier to v5.1.2 2023-12-24 06:35:07 +00:00
tj-actions[bot]
cc08e170f4 Upgraded to v41 (#1811)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2023-12-23 11:07:21 -07:00
28 changed files with 1549 additions and 752 deletions

View File

@@ -208,6 +208,43 @@
"test",
"bug"
]
},
{
"login": "levenleven",
"name": "Aleksey Levenstein",
"avatar_url": "https://avatars.githubusercontent.com/u/6463364?v=4",
"profile": "https://github.com/levenleven",
"contributions": [
"doc"
]
},
{
"login": "dan-hill2802",
"name": "Daniel Hill",
"avatar_url": "https://avatars.githubusercontent.com/u/5046322?v=4",
"profile": "https://github.com/dan-hill2802",
"contributions": [
"doc"
]
},
{
"login": "KeisukeYamashita",
"name": "KeisukeYamashita",
"avatar_url": "https://avatars.githubusercontent.com/u/23056537?v=4",
"profile": "https://keisukeyamashita.com",
"contributions": [
"doc"
]
},
{
"login": "codesculpture",
"name": "Aravind",
"avatar_url": "https://avatars.githubusercontent.com/u/63452117?v=4",
"profile": "https://github.com/codesculpture",
"contributions": [
"code",
"bug"
]
}
],
"contributorsPerLine": 7,

View File

@@ -17,13 +17,13 @@ on:
schedule:
- cron: '15 16 * * 2'
permissions:
actions: read
contents: read
security-events: write
jobs:
codacy-security-scan:
# Cancel other workflows that are running for the same branch
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#concurrency
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
name: Codacy Security Scan
runs-on: ubuntu-latest
steps:
@@ -34,7 +34,7 @@ jobs:
# Execute Codacy Analysis CLI and generate a SARIF output with the security issues identified during the analysis
- name: Run Codacy Analysis CLI
continue-on-error: true
uses: codacy/codacy-analysis-cli-action@v4.3.0
uses: codacy/codacy-analysis-cli-action@v4.4.0
with:
# Check https://github.com/codacy/codacy-analysis-cli#project-token to get your project token from your Codacy repository
# You can also omit the token and run the tools that support default configurations

View File

@@ -20,6 +20,11 @@ on:
schedule:
- cron: '44 20 * * 0'
permissions:
actions: read
contents: read
security-events: write
jobs:
analyze:
name: Analyze

18
.github/workflows/greetings.yml vendored Normal file
View File

@@ -0,0 +1,18 @@
name: Greetings
on: [pull_request_target, issues]
permissions:
pull-requests: write
issues: write
jobs:
greeting:
runs-on: ubuntu-latest
steps:
- uses: actions/first-interaction@v1
continue-on-error: true
with:
repo-token: ${{ secrets.PAT_TOKEN }}
issue-message: "Thanks for reporting this issue, don't forget to star this project if you haven't already to help us reach a wider audience."
pr-message: "Thanks for implementing a fix, could you ensure that the test covers your changes if applicable."

View File

@@ -1,4 +1,8 @@
name: Issue Comment Test
name: Issue Comment Job Example
permissions:
contents: read
on:
issue_comment:

View File

@@ -1,9 +1,11 @@
name: Manual Test
name: Manual Triggered Job Example
permissions:
contents: read
on:
workflow_dispatch:
jobs:
test:
name: Test changed-files

View File

@@ -1,4 +1,7 @@
name: Matrix Test
name: Matrix Example
permissions:
contents: read
on:
workflow_dispatch:
@@ -22,7 +25,6 @@ jobs:
uses: ./
with:
json: true
quotepath: false
escape_json: false
- name: List all changed files
run: echo '${{ steps.changed-files.outputs.all_changed_files }}'

67
.github/workflows/multi-job-example.yml vendored Normal file
View File

@@ -0,0 +1,67 @@
name: Multi Job Example
permissions:
contents: read
on:
push:
branches:
- "**"
pull_request:
branches:
- "**"
jobs:
changed-files:
name: Get changed files
runs-on: ubuntu-latest
outputs:
all_changed_files: ${{ steps.changed-files.outputs.all_changed_files }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get changed files
id: changed-files
uses: ./
- name: List all changed files
run: echo '${{ steps.changed-files.outputs.all_changed_files }}'
view-changed-files:
name: View all changed files
runs-on: ubuntu-latest
needs: [changed-files]
steps:
- name: List all changed files
run: |
echo '${{ needs.changed-files.outputs.all_changed_files }}'
changed-files-rest-api:
name: Get changed files using REST API
runs-on: ubuntu-latest
outputs:
all_changed_files: ${{ steps.changed-files.outputs.all_changed_files }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get changed files
id: changed-files
continue-on-error: ${{ github.event_name == 'push' }}
uses: ./
with:
use_rest_api: true
- name: List all changed files
run: echo '${{ steps.changed-files.outputs.all_changed_files }}'
view-changed-files-rest-api:
name: View all changed files using REST API
runs-on: ubuntu-latest
needs: [changed-files-rest-api]
steps:
- name: List all changed files
run: |
echo '${{ needs.changed-files-rest-api.outputs.all_changed_files }}'

View File

@@ -1,4 +1,9 @@
name: Update release version.
name: Update release version
permissions:
contents: write
pull-requests: write
on:
release:
types: [published]
@@ -32,7 +37,7 @@ jobs:
- name: Run git-cliff
uses: tj-actions/git-cliff@v1
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5.0.2
uses: peter-evans/create-pull-request@v6.0.0
with:
base: "main"
labels: "merge when passing"

View File

@@ -1,5 +1,8 @@
name: CI
permissions:
contents: read
on:
push:
branches:
@@ -31,6 +34,9 @@ jobs:
runs-on: ubuntu-latest
outputs:
files_changed: ${{ steps.changed_files.outputs.files_changed }}
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@v4
with:
@@ -39,7 +45,7 @@ jobs:
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Use Node.js 20.x
uses: actions/setup-node@v4.0.1
uses: actions/setup-node@v4.0.2
with:
cache: 'yarn'
node-version: '20.x'
@@ -54,7 +60,7 @@ jobs:
yarn install
- name: Run eslint on changed files
uses: tj-actions/eslint-changed-files@v21
uses: tj-actions/eslint-changed-files@v23
if: github.event_name == 'pull_request'
with:
token: ${{ secrets.PAT_TOKEN }}
@@ -66,7 +72,7 @@ jobs:
yarn all
- name: Verify Changed files
uses: tj-actions/verify-changed-files@v16
uses: tj-actions/verify-changed-files@v18
id: changed_files
with:
files: |
@@ -90,7 +96,7 @@ jobs:
branch: ${{ github.head_ref }}
- name: Upload build assets
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: build-assets
path: dist
@@ -107,6 +113,8 @@ jobs:
runs-on: ubuntu-latest
needs: build
if: needs.build.outputs.files_changed != 'true'
permissions:
contents: read
steps:
- name: Checkout into dir1
uses: actions/checkout@v4
@@ -117,7 +125,7 @@ jobs:
path: dir1
- name: Download build assets
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: build-assets
path: dir1/dist
@@ -143,7 +151,7 @@ jobs:
bash
- name: Download build assets
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: build-assets
path: dir2/dist
@@ -181,7 +189,8 @@ jobs:
needs: build
runs-on: ubuntu-latest
if: github.event_name == 'push' && needs.build.outputs.files_changed != 'true'
permissions:
contents: read
steps:
- name: Checkout branch
uses: actions/checkout@v4
@@ -190,7 +199,7 @@ jobs:
fetch-depth: 0
- name: Download build assets
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: build-assets
@@ -239,6 +248,8 @@ jobs:
runs-on: ubuntu-latest
needs: build
if: needs.build.outputs.files_changed != 'true'
permissions:
contents: read
steps:
- name: Checkout branch
@@ -248,7 +259,7 @@ jobs:
fetch-depth: 0
- name: Download build assets
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: build-assets
@@ -281,6 +292,8 @@ jobs:
github.event_name == 'push' ||
github.event_name == 'pull_request'
) && needs.build.outputs.files_changed != 'true'
permissions:
contents: read
steps:
- name: Checkout branch
@@ -290,7 +303,7 @@ jobs:
fetch-depth: 0
- name: Download build assets
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: build-assets
@@ -311,6 +324,8 @@ jobs:
runs-on: ubuntu-latest
needs: build
if: needs.build.outputs.files_changed != 'true'
permissions:
contents: read
strategy:
fail-fast: false
@@ -327,7 +342,7 @@ jobs:
fetch-depth: ${{ matrix.fetch-depth }}
- name: Download build assets
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: build-assets
@@ -350,6 +365,8 @@ jobs:
runs-on: ubuntu-latest
needs: build
if: github.event_name != 'push' && needs.build.outputs.files_changed != 'true'
permissions:
contents: read
steps:
- name: Checkout branch
@@ -358,7 +375,7 @@ jobs:
ref: ${{ github.event.pull_request.head.sha }}
- name: Download build assets
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: build-assets
@@ -377,6 +394,8 @@ jobs:
runs-on: ubuntu-latest
needs: build
if: github.event_name != 'push' && needs.build.outputs.files_changed != 'true'
permissions:
contents: read
strategy:
fail-fast: false
max-parallel: 4
@@ -392,7 +411,7 @@ jobs:
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Download build assets
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: build-assets
@@ -411,13 +430,14 @@ jobs:
runs-on: ubuntu-latest
needs: build
if: needs.build.outputs.files_changed != 'true'
permissions:
contents: read
steps:
- name: Checkout branch
uses: actions/checkout@v4
- name: Download build assets
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: build-assets
@@ -465,13 +485,14 @@ jobs:
runs-on: ubuntu-latest
needs: build
if: needs.build.outputs.files_changed != 'true'
permissions:
contents: read
steps:
- name: Checkout branch
uses: actions/checkout@v4
- name: Download build assets
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: build-assets
@@ -531,7 +552,7 @@ jobs:
path: dir1
- name: Download build assets
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: build-assets
path: dir1/dist
@@ -546,11 +567,46 @@ jobs:
shell:
bash
test-non-existing-repository:
name: Test changed-files with non existing repository
runs-on: ubuntu-latest
needs: build
if: github.event_name == 'push' && needs.build.outputs.files_changed != 'true'
permissions:
contents: read
steps:
- name: Checkout into dir1
uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
submodules: true
fetch-depth: 0
path: dir1
- name: Download build assets
uses: actions/download-artifact@v4
with:
name: build-assets
path: dir1/dist
- name: Run changed-files with non existing repository
id: changed-files
continue-on-error: true
uses: ./dir1
- name: Verify failed
if: steps.changed-files.outcome != 'failure'
run: |
echo "Expected: (failure) got ${{ steps.changed-files.outcome }}"
exit 1
test-submodules:
name: Test changed-files with submodule
runs-on: ubuntu-latest
needs: build
if: needs.build.outputs.files_changed != 'true'
permissions:
contents: read
strategy:
fail-fast: false
max-parallel: 4
@@ -566,7 +622,7 @@ jobs:
fetch-depth: ${{ matrix.fetch-depth }}
- name: Download build assets
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: build-assets
@@ -594,6 +650,8 @@ jobs:
runs-on: ubuntu-latest
needs: build
if: needs.build.outputs.files_changed != 'true'
permissions:
contents: read
strategy:
fail-fast: false
max-parallel: 4
@@ -609,7 +667,7 @@ jobs:
fetch-depth: ${{ matrix.fetch-depth }}
- name: Download build assets
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: build-assets
@@ -669,6 +727,8 @@ jobs:
runs-on: ubuntu-latest
needs: build
if: needs.build.outputs.files_changed != 'true'
permissions:
contents: read
strategy:
fail-fast: false
max-parallel: 4
@@ -684,7 +744,7 @@ jobs:
fetch-depth: ${{ matrix.fetch-depth }}
- name: Download build assets
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: build-assets
@@ -859,6 +919,8 @@ jobs:
runs-on: ubuntu-latest
needs: build
if: needs.build.outputs.files_changed != 'true'
permissions:
contents: read
steps:
- name: Checkout branch
uses: actions/checkout@v4
@@ -892,6 +954,8 @@ jobs:
runs-on: ubuntu-latest
needs: build
if: needs.build.outputs.files_changed != 'true'
permissions:
contents: read
steps:
- name: Checkout branch
uses: actions/checkout@v4
@@ -933,6 +997,8 @@ jobs:
runs-on: ubuntu-latest
needs: build
if: needs.build.outputs.files_changed != 'true'
permissions:
contents: read
strategy:
fail-fast: false
max-parallel: 4
@@ -949,7 +1015,7 @@ jobs:
fetch-depth: ${{ matrix.fetch-depth }}
- name: Download build assets
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: build-assets
@@ -983,6 +1049,8 @@ jobs:
runs-on: ${{ matrix.platform }}
needs: build
if: needs.build.outputs.files_changed != 'true'
permissions:
contents: read
strategy:
fail-fast: false
max-parallel: 4
@@ -998,7 +1066,7 @@ jobs:
repository: ${{ github.event.pull_request.head.repo.full_name }}
fetch-depth: ${{ matrix.fetch-depth }}
- name: Download build assets
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: build-assets
- name: Dump GitHub context
@@ -1013,7 +1081,7 @@ jobs:
echo '${{ toJSON(steps.changed-files.outputs) }}'
shell:
bash
- name: Run changed-files with dir name
- name: Run changed-files with dir name pattern
id: changed-files-dir-name
uses: ./
with:

View File

@@ -1,5 +1,9 @@
name: Format README.md
permissions:
contents: read
pull-requests: write
on:
push:
branches:
@@ -23,7 +27,7 @@ jobs:
uses: tj-actions/remark@v3
- name: Verify Changed files
uses: tj-actions/verify-changed-files@v16
uses: tj-actions/verify-changed-files@v18
id: verify_changed_files
with:
files: |
@@ -37,7 +41,7 @@ jobs:
- name: Create Pull Request
if: failure()
uses: peter-evans/create-pull-request@v5
uses: peter-evans/create-pull-request@v6
with:
base: "main"
labels: "merge when passing"

View File

@@ -0,0 +1,41 @@
name: Workflow Run Example
on:
workflow_run:
workflows: [Matrix Example]
types: [completed]
permissions:
contents: read
jobs:
on-success:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Get changed files
id: changed-files
uses: ./
- name: Echo list of changed files on success
run: |
echo "Changed files on success:"
echo "${{ steps.changed-files.outputs.all_changed_files }}"
on-failure:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Get changed files
id: changed-files
uses: ./
- name: Echo list of changed files on failure
run: |
echo "Changed files on failure:"
echo "${{ steps.changed-files.outputs.all_changed_files }}"

View File

@@ -1,5 +1,341 @@
# Changelog
# [42.0.3](https://github.com/tj-actions/changed-files/compare/v42.0.2...v42.0.3) - (2024-02-17)
## <!-- 1 -->🐛 Bug Fixes
- **payload_api, git_diff:** Accessing correct property in payload and Replacing --quiet with --no-patch in git diff ([#1934](https://github.com/tj-actions/changed-files/issues/1934)) ([e3cac49](https://github.com/tj-actions/changed-files/commit/e3cac49049b6b59f85d64402e7477f0a211ceba0)) - (Aravind)
- Broken link to matrix example workflow ([#1918](https://github.com/tj-actions/changed-files/issues/1918)) ([ea35f7e](https://github.com/tj-actions/changed-files/commit/ea35f7ea0028180dacddb2da5124befbdcd5287c)) - (KeisukeYamashita)
## <!-- 16 --> Add
- Added missing changes and modified dist assets.
([07ac0ac](https://github.com/tj-actions/changed-files/commit/07ac0ac1689ff4da699108e90989bed8946c655a)) - (GitHub Action)
## <!-- 26 -->🔄 Update
- Updated README.md ([#1938](https://github.com/tj-actions/changed-files/issues/1938))
Co-authored-by: jackton1 <17484350+jackton1@users.noreply.github.com> ([ec75ae5](https://github.com/tj-actions/changed-files/commit/ec75ae5ab7296b81fd4cddb77294d6718932ebab)) - (tj-actions[bot])
- Update README.md ([8eced8a](https://github.com/tj-actions/changed-files/commit/8eced8a5dfe679a00fc7e6bcf4a149062d82cf71)) - (Tonye Jack)
- Update README.md ([b2d4e1b](https://github.com/tj-actions/changed-files/commit/b2d4e1b488ced71a4b179146ee5a7b8b5b3df94e)) - (Tonye Jack)
- Updated README.md ([#1920](https://github.com/tj-actions/changed-files/issues/1920))
Co-authored-by: jackton1 <17484350+jackton1@users.noreply.github.com> ([3399f88](https://github.com/tj-actions/changed-files/commit/3399f8837f429519cf24ed4359003d14f3f41b0d)) - (tj-actions[bot])
- Updated README.md ([#1917](https://github.com/tj-actions/changed-files/issues/1917))
Co-authored-by: jackton1 <17484350+jackton1@users.noreply.github.com> ([8e56bc0](https://github.com/tj-actions/changed-files/commit/8e56bc097abe73a65e6d3c0888ea6f640c4b5480)) - (tj-actions[bot])
- Update action.yml ([f6d3fe5](https://github.com/tj-actions/changed-files/commit/f6d3fe51790f667e42e9dc12cf25330b9fd74c3f)) - (Tonye Jack)
- Update README.md ([efa99ea](https://github.com/tj-actions/changed-files/commit/efa99ea361dae4d03a985a185259587543eede5c)) - (Tonye Jack)
- Update README.md ([6d8f9bd](https://github.com/tj-actions/changed-files/commit/6d8f9bd37957780639752a3b4b505f4069c40711)) - (Tonye Jack)
- Updated README.md ([#1915](https://github.com/tj-actions/changed-files/issues/1915))
Co-authored-by: jackton1 <17484350+jackton1@users.noreply.github.com> ([7daee9e](https://github.com/tj-actions/changed-files/commit/7daee9e7cfe9c6e0cb6a782ba9785239ce9ee710)) - (tj-actions[bot])
- Update README.md ([99c80bd](https://github.com/tj-actions/changed-files/commit/99c80bdd472eb81ca8c582122685b14030d15bf4)) - (Tonye Jack)
- Updated README.md ([#1911](https://github.com/tj-actions/changed-files/issues/1911))
Co-authored-by: jackton1 <17484350+jackton1@users.noreply.github.com> ([aa31060](https://github.com/tj-actions/changed-files/commit/aa3106085139b0f9138cf44fe701756ff9ee97b2)) - (tj-actions[bot])
- Update README.md ([d3ac2a0](https://github.com/tj-actions/changed-files/commit/d3ac2a064b75442d15c932e0ade4949a9e701720)) - (Tonye Jack)
- Updated README.md ([#1896](https://github.com/tj-actions/changed-files/issues/1896))
Co-authored-by: jackton1 <jackton1@users.noreply.github.com> ([df12603](https://github.com/tj-actions/changed-files/commit/df12603b45b253b6bc04da5357a791da6d645f36)) - (tj-actions[bot])
- Updated README.md ([#1894](https://github.com/tj-actions/changed-files/issues/1894))
Co-authored-by: renovate[bot] <renovate[bot]@users.noreply.github.com> ([31b9c0a](https://github.com/tj-actions/changed-files/commit/31b9c0a5412203ed77a8c8073d72fbc01afc5d22)) - (tj-actions[bot])
## <!-- 3 -->📚 Documentation
- Add codesculpture as a contributor for code, and bug ([#1937](https://github.com/tj-actions/changed-files/issues/1937)) ([4333ab5](https://github.com/tj-actions/changed-files/commit/4333ab5b20c7b9aa411f4a07771329cfb0c76a8c)) - (allcontributors[bot])
- Add KeisukeYamashita as a contributor for doc ([#1919](https://github.com/tj-actions/changed-files/issues/1919)) ([ac897da](https://github.com/tj-actions/changed-files/commit/ac897da4f16ed414adb6afa4be273b632dda0e0f)) - (allcontributors[bot])
- Add dan-hill2802 as a contributor for doc ([#1910](https://github.com/tj-actions/changed-files/issues/1910)) ([e57fb1b](https://github.com/tj-actions/changed-files/commit/e57fb1b8ebd3184b29316b19d14d36e672dfa805)) - (allcontributors[bot])
- Add levenleven as a contributor for doc ([#1893](https://github.com/tj-actions/changed-files/issues/1893)) ([bb9b5e8](https://github.com/tj-actions/changed-files/commit/bb9b5e8363dd295a835a4b7a10ff92ae4f021798)) - (allcontributors[bot])
## <!-- 30 -->📝 Other
- Correct bash loop in examples ([#1908](https://github.com/tj-actions/changed-files/issues/1908))
Co-authored-by: Tonye Jack <jtonye@ymail.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com> ([54c5610](https://github.com/tj-actions/changed-files/commit/54c56103aa0c1a94083e91d0b68e8a5e48a330b5)) - (Daniel Hill)
## <!-- 7 -->⚙️ Miscellaneous Tasks
- **deps:** Update github artifact actions to v4 (major) ([#1936](https://github.com/tj-actions/changed-files/issues/1936)) ([68bd453](https://github.com/tj-actions/changed-files/commit/68bd4537bdc54c6655242c1abe305f4db218e355)) - (renovate[bot])
- **deps:** Update dependency eslint-plugin-jest to v27.9.0 ([f0ce41b](https://github.com/tj-actions/changed-files/commit/f0ce41b71c3bb642dfc7cb1ab61d14d3b56af681)) - (renovate[bot])
- **deps:** Update dependency @types/node to v20.11.19 ([ce451bf](https://github.com/tj-actions/changed-files/commit/ce451bf4305b235566956f53995646542519bb6d)) - (renovate[bot])
- **deps:** Update dependency @types/node to v20.11.18 ([7592e9e](https://github.com/tj-actions/changed-files/commit/7592e9e85578b94665efe3910aef29cc3c580acf)) - (renovate[bot])
- **deps:** Lock file maintenance ([999653c](https://github.com/tj-actions/changed-files/commit/999653c6727cb4c932803b25be2a0f5e8b639428)) - (renovate[bot])
- **deps:** Update dependency eslint-plugin-jest to v27.8.0 ([6cf4c21](https://github.com/tj-actions/changed-files/commit/6cf4c21fdf9b364e92a686e7ef69bc6e9499a622)) - (renovate[bot])
- Update codacy-analysis.yml ([#1929](https://github.com/tj-actions/changed-files/issues/1929)) ([09ee51b](https://github.com/tj-actions/changed-files/commit/09ee51bee3431c6c679313bdd0f8539ec345d71b)) - (Tonye Jack)
- **deps:** Update typescript-eslint monorepo to v7 (major) ([#1927](https://github.com/tj-actions/changed-files/issues/1927)) ([13fa140](https://github.com/tj-actions/changed-files/commit/13fa1402a766abdaa44e85fe59bdd652f26fb1e3)) - (renovate[bot])
- **deps:** Lock file maintenance ([049d7fd](https://github.com/tj-actions/changed-files/commit/049d7fd63935c64ac0615242d973a72f79fb7861)) - (renovate[bot])
- **deps:** Update dependency @types/node to v20.11.17 ([2e90fbb](https://github.com/tj-actions/changed-files/commit/2e90fbb74b68ff52de2335c534fd88dd4df333bb)) - (renovate[bot])
- **deps:** Update codacy/codacy-analysis-cli-action action to v4.4.0 ([2a9db54](https://github.com/tj-actions/changed-files/commit/2a9db54a6d9228d6731a7a28757b6dda48ffb5e7)) - (renovate[bot])
- **deps:** Update actions/setup-node action to v4.0.2 ([d0d5671](https://github.com/tj-actions/changed-files/commit/d0d5671ef76808f63c72ef7f5ac4ec7bb88aab3c)) - (renovate[bot])
- Update README.md ([#1922](https://github.com/tj-actions/changed-files/issues/1922)) ([97120ff](https://github.com/tj-actions/changed-files/commit/97120ff1f582e850f1e543bd317c4430a90738dd)) - (Tonye Jack)
- Update workflow-run-example.yml ([#1921](https://github.com/tj-actions/changed-files/issues/1921)) ([9299962](https://github.com/tj-actions/changed-files/commit/9299962a594f73b73738005ba86c46fac9aa9f8c)) - (Tonye Jack)
- **deps:** Update typescript-eslint monorepo to v6.21.0 ([589fb70](https://github.com/tj-actions/changed-files/commit/589fb70c81f4092791f63c5b9d5afadaa010ce4a)) - (renovate[bot])
- **deps:** Update dependency prettier to v3.2.5 ([5e7cbf5](https://github.com/tj-actions/changed-files/commit/5e7cbf5fdb0a73516874da582461d3b20594a4ee)) - (renovate[bot])
- **deps:** Lock file maintenance ([b4d6d28](https://github.com/tj-actions/changed-files/commit/b4d6d28988c21e97bc68d80fe4f3869808fc2ccc)) - (renovate[bot])
- **deps:** Update tj-actions/verify-changed-files action to v18 ([#1912](https://github.com/tj-actions/changed-files/issues/1912)) ([8370e6e](https://github.com/tj-actions/changed-files/commit/8370e6e6ef8b17619dcfd5df473376b6a29fd38d)) - (renovate[bot])
- Create greetings workflow ([#1909](https://github.com/tj-actions/changed-files/issues/1909)) ([926735a](https://github.com/tj-actions/changed-files/commit/926735a61eb7d21e371d03839cc34234af5e3154)) - (Tonye Jack)
- **deps:** Update dependency @types/node to v20.11.16 ([91df40b](https://github.com/tj-actions/changed-files/commit/91df40b8820291e54292e540e88890dc714cbea0)) - (renovate[bot])
- **deps:** Update dependency @types/jest to v29.5.12 ([28396e9](https://github.com/tj-actions/changed-files/commit/28396e96588ea678169a84011413fca4caffd650)) - (renovate[bot])
- **deps:** Update dependency @types/node to v20.11.15 ([3a66e2a](https://github.com/tj-actions/changed-files/commit/3a66e2a7e4fe21d25ecb52b6fce34961fe145069)) - (renovate[bot])
- **deps:** Update dependency @types/node to v20.11.14 ([35f3202](https://github.com/tj-actions/changed-files/commit/35f3202fd5e18d84a08b1a801e27dae5937f8861)) - (renovate[bot])
- **deps:** Update peter-evans/create-pull-request action to v6 ([#1903](https://github.com/tj-actions/changed-files/issues/1903)) ([2b30af4](https://github.com/tj-actions/changed-files/commit/2b30af482a4d71219f529e7d7003fdd9daaf0ab8)) - (renovate[bot])
- **deps:** Update dependency @types/node to v20.11.13 ([a93bcf4](https://github.com/tj-actions/changed-files/commit/a93bcf46e0c0e0699fe7a4d16906f27be0dda5bc)) - (renovate[bot])
- **deps:** Update dependency @types/node to v20.11.12 ([6d4c555](https://github.com/tj-actions/changed-files/commit/6d4c555c7d6cf1c77671254c2c2a9d713f5c5476)) - (renovate[bot])
- **deps:** Update dependency @types/node to v20.11.11 ([507a8c7](https://github.com/tj-actions/changed-files/commit/507a8c703d2415e979369d17911bf6a5003eb8f3)) - (renovate[bot])
- Update test ([#1899](https://github.com/tj-actions/changed-files/issues/1899)) ([3a7052c](https://github.com/tj-actions/changed-files/commit/3a7052c24aae082076d23f357177e111b201c4d4)) - (Tonye Jack)
- **deps:** Update typescript-eslint monorepo to v6.20.0 ([782eb12](https://github.com/tj-actions/changed-files/commit/782eb123a95b8e0dbce4b402f24b2b3b8fc82791)) - (renovate[bot])
- **deps:** Lock file maintenance ([9134dac](https://github.com/tj-actions/changed-files/commit/9134dac8f6b4c8a40e0518e486edff3560e20ead)) - (renovate[bot])
- **deps:** Update dependency @types/node to v20.11.10 ([ba0a561](https://github.com/tj-actions/changed-files/commit/ba0a561b1342d8019ab99e5fc6b9146fc669fe49)) - (renovate[bot])
- Fix broken matrix example links ([#1891](https://github.com/tj-actions/changed-files/issues/1891)) ([8d35cbb](https://github.com/tj-actions/changed-files/commit/8d35cbb00f191ec43b7f5dddf3b2e7304677b75d)) - (Aleksey Levenstein)
- **deps:** Update dependency @types/node to v20.11.9 ([82dd654](https://github.com/tj-actions/changed-files/commit/82dd6547dc05944a5d7e90892a9eca812ff864ed)) - (renovate[bot])
- **deps:** Lock file maintenance ([6d42539](https://github.com/tj-actions/changed-files/commit/6d42539842805201a6c4eca7a86c1f5d1e6293fb)) - (renovate[bot])
- **deps:** Update dependency @types/node to v20.11.8 ([08dedfb](https://github.com/tj-actions/changed-files/commit/08dedfb681e840f67fb7804f1879452cb6e3be6c)) - (renovate[bot])
- **deps:** Update dependency @types/node to v20.11.7 ([f6d9fa1](https://github.com/tj-actions/changed-files/commit/f6d9fa10e0aa52b19c5d717b320f6ddc24858f19)) - (renovate[bot])
- **deps:** Update dependency @types/uuid to v9.0.8 ([9eb0d76](https://github.com/tj-actions/changed-files/commit/9eb0d763aec34f920761d9f349680a549958fe6e)) - (renovate[bot])
## <!-- 9 -->⬆️ Upgrades
- Upgraded to v42.0.2 ([#1886](https://github.com/tj-actions/changed-files/issues/1886))
Co-authored-by: jackton1 <jackton1@users.noreply.github.com> ([51d2f88](https://github.com/tj-actions/changed-files/commit/51d2f88f079c072d026257c3f20e2823e7e3577f)) - (tj-actions[bot])
# [42.0.2](https://github.com/tj-actions/changed-files/compare/v42.0.1...v42.0.2) - (2024-01-25)
## <!-- 0 -->🚀 Features
- Enhance error handling for non-git directories ([#1885](https://github.com/tj-actions/changed-files/issues/1885)) ([90a06d6](https://github.com/tj-actions/changed-files/commit/90a06d6ba9543371ab4df8eeca0be07ca6054959)) - (Tonye Jack)
## <!-- 9 -->⬆️ Upgrades
- Upgraded to v42.0.1 ([#1884](https://github.com/tj-actions/changed-files/issues/1884))
Co-authored-by: jackton1 <jackton1@users.noreply.github.com> ([2cb2c92](https://github.com/tj-actions/changed-files/commit/2cb2c9234e9dc3b8eaac2ababc3f355e80e47963)) - (tj-actions[bot])
# [42.0.1](https://github.com/tj-actions/changed-files/compare/v42.0.0...v42.0.1) - (2024-01-24)
## <!-- 16 --> Add
- Added missing changes and modified dist assets.
([ea024b2](https://github.com/tj-actions/changed-files/commit/ea024b2d7f80389ba16e7084b20265cb7dfe230f)) - (GitHub Action)
- Added missing changes and modified dist assets.
([3af07c2](https://github.com/tj-actions/changed-files/commit/3af07c2040da68166f613248bd8e9cd28fb581e3)) - (GitHub Action)
## <!-- 26 -->🔄 Update
- Update env.ts ([3680129](https://github.com/tj-actions/changed-files/commit/3680129aa2971333ef3d148024520cdc5327a6b7)) - (Tonye Jack)
## <!-- 7 -->⚙️ Miscellaneous Tasks
- **deps:** Update dependency @types/node to v20.11.6 ([ac21d93](https://github.com/tj-actions/changed-files/commit/ac21d93904fb48e7f76ce4bd2a4d197f67e34abe)) - (renovate[bot])
- **deps:** Update typescript-eslint monorepo to v6.19.1 ([a4637ea](https://github.com/tj-actions/changed-files/commit/a4637ea6e7d9a502f6edb845b6c65086c5bce55f)) - (renovate[bot])
- **deps:** Update dependency ts-jest to v29.1.2 ([fd9998c](https://github.com/tj-actions/changed-files/commit/fd9998cf5fcac4b0fff205a58ec694bf596169c8)) - (renovate[bot])
- **deps:** Lock file maintenance ([db4e584](https://github.com/tj-actions/changed-files/commit/db4e5848448e4b540e7e7dcbdc7aab3c88bfcf47)) - (renovate[bot])
- Rename example worflows from test to example ([#1878](https://github.com/tj-actions/changed-files/issues/1878)) ([c6543c4](https://github.com/tj-actions/changed-files/commit/c6543c497aea61c2263b735dece03b23383441f0)) - (Tonye Jack)
- Update README.md ([#1877](https://github.com/tj-actions/changed-files/issues/1877)) ([88f9f3e](https://github.com/tj-actions/changed-files/commit/88f9f3efbb5a8fe2acff4139babc1d6aeafa5e72)) - (Tonye Jack)
- **deps:** Lock file maintenance ([5d866cb](https://github.com/tj-actions/changed-files/commit/5d866cbe77002ed91912202826ed253b808a9133)) - (renovate[bot])
- **deps:** Update tj-actions/eslint-changed-files action to v23 ([#1875](https://github.com/tj-actions/changed-files/issues/1875)) ([346f237](https://github.com/tj-actions/changed-files/commit/346f237a1734287fa772ee254047beecabcdbdf2)) - (renovate[bot])
## <!-- 9 -->⬆️ Upgrades
- Upgraded to v42 ([#1874](https://github.com/tj-actions/changed-files/issues/1874))
Co-authored-by: jackton1 <jackton1@users.noreply.github.com> ([c037f1e](https://github.com/tj-actions/changed-files/commit/c037f1e7c56c7884b2d7d24c36cd8a0bc2c20687)) - (tj-actions[bot])
# [42.0.0](https://github.com/tj-actions/changed-files/compare/v41.1.2...v42.0.0) - (2024-01-18)
## <!-- 0 -->🚀 Features
- Add support for include/exclude all nested files when a directory is specified and ends with a slash ([#1873](https://github.com/tj-actions/changed-files/issues/1873)) ([ae82ed4](https://github.com/tj-actions/changed-files/commit/ae82ed4ae04587b665efad2f206578aa6f0e8539)) - (Tonye Jack)
## <!-- 1 -->🐛 Bug Fixes
- Update input warning ([#1870](https://github.com/tj-actions/changed-files/issues/1870)) ([6c9dcea](https://github.com/tj-actions/changed-files/commit/6c9dcea4432fd0eb2f3e07c9149eab2807ce44b2)) - (Tonye Jack)
## <!-- 18 -->📝 Rename
- Unsupported REST API inputs constant name ([#1872](https://github.com/tj-actions/changed-files/issues/1872)) ([cbd5907](https://github.com/tj-actions/changed-files/commit/cbd59070e8276b539ecdfa0f2316db7b1599ea0f)) - (Tonye Jack)
## <!-- 7 -->⚙️ Miscellaneous Tasks
- **deps:** Update dependency prettier to v3.2.4 ([79b060d](https://github.com/tj-actions/changed-files/commit/79b060d4450764e6b54a73696c2d99134757db95)) - (renovate[bot])
## <!-- 9 -->⬆️ Upgrades
- Upgraded to v41.1.2 ([#1869](https://github.com/tj-actions/changed-files/issues/1869))
Co-authored-by: jackton1 <jackton1@users.noreply.github.com> ([434b67e](https://github.com/tj-actions/changed-files/commit/434b67ebc3051662cf28de12b8a7adb77aea522a)) - (tj-actions[bot])
# [41.1.2](https://github.com/tj-actions/changed-files/compare/v41.1.1...v41.1.2) - (2024-01-17)
## <!-- 0 -->🚀 Features
- Enhance error handling and working directory resolution ([#1859](https://github.com/tj-actions/changed-files/issues/1859)) ([a60bf37](https://github.com/tj-actions/changed-files/commit/a60bf3759e069549b60c8da1284ec83e0398a1a4)) - (Tonye Jack)
## <!-- 1 -->🐛 Bug Fixes
- Bug with incorrect action path ([#1866](https://github.com/tj-actions/changed-files/issues/1866)) ([3f81899](https://github.com/tj-actions/changed-files/commit/3f8189989ba6fd9b3b9593ffe650236b3f1fcb55)) - (Tonye Jack)
## <!-- 7 -->⚙️ Miscellaneous Tasks
- **deps:** Update dependency @types/node to v20.11.5 ([cbda684](https://github.com/tj-actions/changed-files/commit/cbda684547adc8c052d50711417fa61b428a9f88)) - (renovate[bot])
- **deps:** Update dependency prettier to v3.2.3 ([67a1f54](https://github.com/tj-actions/changed-files/commit/67a1f54f6f5ec7ee87c57eb7876a7d6dfdcc59a1)) - (renovate[bot])
- **deps:** Update tj-actions/eslint-changed-files action to v22 ([#1864](https://github.com/tj-actions/changed-files/issues/1864)) ([99248a4](https://github.com/tj-actions/changed-files/commit/99248a443855d73284abf52520f897dba851b914)) - (renovate[bot])
- **deps:** Update dependency @types/node to v20.11.4 ([8787431](https://github.com/tj-actions/changed-files/commit/878743189ba0ba42d467a736923b07102f0e348c)) - (renovate[bot])
- **deps:** Update dependency @types/node to v20.11.3 ([98d1d84](https://github.com/tj-actions/changed-files/commit/98d1d84e2f7a404c425df4e44dceb74a03920ac8)) - (renovate[bot])
- **deps:** Update typescript-eslint monorepo to v6.19.0 ([bc46e4c](https://github.com/tj-actions/changed-files/commit/bc46e4c4222c3926a70378d183f0b387d3a9e9a8)) - (renovate[bot])
- **deps:** Update dependency @types/node to v20.11.2 ([fba4067](https://github.com/tj-actions/changed-files/commit/fba40673489d49e860c15a444c134d887ead1f3a)) - (renovate[bot])
- **deps:** Update dependency @types/node to v20.11.1 ([e4b8674](https://github.com/tj-actions/changed-files/commit/e4b86747326bc58eb230d62188ebdd66b73721a9)) - (renovate[bot])
- **deps:** Lock file maintenance ([bc2b5ae](https://github.com/tj-actions/changed-files/commit/bc2b5aef20add66cbe21d1093f0f1d37a353d376)) - (renovate[bot])
- **deps:** Update dependency prettier to v3.2.2 ([63c36a5](https://github.com/tj-actions/changed-files/commit/63c36a563a30544b4c03a8426277dca4b00e4fd1)) - (renovate[bot])
## <!-- 9 -->⬆️ Upgrades
- Upgraded to v41.1.1 ([#1854](https://github.com/tj-actions/changed-files/issues/1854))
Co-authored-by: jackton1 <jackton1@users.noreply.github.com> ([44b7750](https://github.com/tj-actions/changed-files/commit/44b77505fe3f2c6d0a76f72a4ef512e7c2ba0b6a)) - (tj-actions[bot])
# [41.1.1](https://github.com/tj-actions/changed-files/compare/v41.1.0...v41.1.1) - (2024-01-13)
## <!-- 1 -->🐛 Bug Fixes
- Bug with inaccurate warnings ([#1853](https://github.com/tj-actions/changed-files/issues/1853)) ([62f4729](https://github.com/tj-actions/changed-files/commit/62f4729b5df35e6e0e01265fa70a82ccaf196b4b)) - (Tonye Jack)
## <!-- 9 -->⬆️ Upgrades
- Upgraded to v41.1.0 ([#1852](https://github.com/tj-actions/changed-files/issues/1852))
Co-authored-by: jackton1 <jackton1@users.noreply.github.com> ([e0579ab](https://github.com/tj-actions/changed-files/commit/e0579abf95abec8042468976c7822e6867542199)) - (tj-actions[bot])
# [41.1.0](https://github.com/tj-actions/changed-files/compare/v41.0.1...v41.1.0) - (2024-01-13)
## <!-- 0 -->🚀 Features
- Add support for forcing the use of GitHubs REST API ([#1849](https://github.com/tj-actions/changed-files/issues/1849)) ([0ca1c07](https://github.com/tj-actions/changed-files/commit/0ca1c07b47b66abe421382a891da70a506e60e8a)) - (Tonye Jack)
## <!-- 1 -->🐛 Bug Fixes
- Permission with release workflow ([#1851](https://github.com/tj-actions/changed-files/issues/1851)) ([8e0194b](https://github.com/tj-actions/changed-files/commit/8e0194b29bc4bb6dd2338b6b7b915c56c2df6f58)) - (Tonye Jack)
## <!-- 26 -->🔄 Update
- Updated README.md ([#1850](https://github.com/tj-actions/changed-files/issues/1850))
Co-authored-by: jackton1 <jackton1@users.noreply.github.com> ([3649d28](https://github.com/tj-actions/changed-files/commit/3649d2842d46e7cc679c204d917887f7821cf08a)) - (tj-actions[bot])
- Updated README.md ([#1830](https://github.com/tj-actions/changed-files/issues/1830))
Co-authored-by: jackton1 <jackton1@users.noreply.github.com> ([3fbf5fb](https://github.com/tj-actions/changed-files/commit/3fbf5fb588c7e1fdbc140668150a2b725984c6ed)) - (tj-actions[bot])
- Update README.md ([9523067](https://github.com/tj-actions/changed-files/commit/95230678db8c15d57cd678fbcd2a7e87e83ac1e1)) - (Tonye Jack)
- Update README.md ([032add1](https://github.com/tj-actions/changed-files/commit/032add13e8e88878dc3238258baee58dcb4a528a)) - (Tonye Jack)
## <!-- 7 -->⚙️ Miscellaneous Tasks
- Update top level workflow permissions ([#1848](https://github.com/tj-actions/changed-files/issues/1848)) ([a57f4dc](https://github.com/tj-actions/changed-files/commit/a57f4dcc814fa55691c9ee5fc6e07c7487cb69f1)) - (Tonye Jack)
- **deps:** Update dependency prettier to v3.2.1 ([9c39b0b](https://github.com/tj-actions/changed-files/commit/9c39b0b6e9d3a1e534a35da2e6142c8b1d0204b3)) - (renovate[bot])
- **deps:** Update dependency eslint-plugin-jest to v27.6.3 ([8b141f3](https://github.com/tj-actions/changed-files/commit/8b141f390680a108c54963421dbc9ed587516859)) - (renovate[bot])
- Create multi-job-test.yml ([#1843](https://github.com/tj-actions/changed-files/issues/1843)) ([17e07d8](https://github.com/tj-actions/changed-files/commit/17e07d8bc032c41929a28e4ac0180f5fd41e62e8)) - (Tonye Jack)
- Update warning message ([#1845](https://github.com/tj-actions/changed-files/issues/1845)) ([13fa1c0](https://github.com/tj-actions/changed-files/commit/13fa1c06fc72cd769f43877df4deb2fcef0070bf)) - (Tonye Jack)
- **deps:** Update dependency prettier to v3.2.0 ([0deb29d](https://github.com/tj-actions/changed-files/commit/0deb29d192a79307172c8ca2af53b9163e1f2dce)) - (renovate[bot])
- **deps:** Update dependency @types/node to v20.11.0 ([28267ee](https://github.com/tj-actions/changed-files/commit/28267ee8b7e9d0a1510577b3da5c95991e566f8d)) - (renovate[bot])
- **deps:** Update dependency eslint-plugin-jest to v27.6.2 ([094d344](https://github.com/tj-actions/changed-files/commit/094d3441f851cdd60b3184c559065cff58998103)) - (renovate[bot])
- **deps:** Update dependency eslint-plugin-prettier to v5.1.3 ([aeec36b](https://github.com/tj-actions/changed-files/commit/aeec36b0354dca21f43136a2a5be79815ad013b9)) - (renovate[bot])
- **deps-dev:** Bump @types/node from 20.10.7 to 20.10.8 ([#1836](https://github.com/tj-actions/changed-files/issues/1836)) ([2d0270c](https://github.com/tj-actions/changed-files/commit/2d0270c489bf57145dd4a63d0a5fcf35a7147bc3)) - (dependabot[bot])
- **deps:** Update typescript-eslint monorepo to v6.18.1 ([0e0adfa](https://github.com/tj-actions/changed-files/commit/0e0adfa0d3cc3663f8db2d833bbec96034e98250)) - (renovate[bot])
- Update jest.config.js ([#1834](https://github.com/tj-actions/changed-files/issues/1834)) ([5313e6b](https://github.com/tj-actions/changed-files/commit/5313e6bbe36db02444adb6db8803c3fb020fbeef)) - (Tonye Jack)
- **deps:** Lock file maintenance ([54789be](https://github.com/tj-actions/changed-files/commit/54789be3a182749c98b3750327225ef16ae72b85)) - (renovate[bot])
- **deps:** Update dependency @types/node to v20.10.7 ([1675238](https://github.com/tj-actions/changed-files/commit/1675238cfd53ec058721786adb67a77f56f46987)) - (renovate[bot])
- Create workflow-run-test.yml ([#1828](https://github.com/tj-actions/changed-files/issues/1828)) ([fdccafb](https://github.com/tj-actions/changed-files/commit/fdccafbb6e5c278dc3360f8a44f7c2878206751f)) - (Tonye Jack)
- **deps:** Update typescript-eslint monorepo to v6.18.0 ([0e8d796](https://github.com/tj-actions/changed-files/commit/0e8d796ee02804f613950c68e90685e43f22c9d5)) - (renovate[bot])
- **deps:** Update dependency eslint-plugin-jest to v27.6.1 ([0c6f2ac](https://github.com/tj-actions/changed-files/commit/0c6f2ac4885216b1830ecbcc3573209980c97716)) - (renovate[bot])
- **deps:** Update typescript-eslint monorepo to v6.17.0 ([1db97ad](https://github.com/tj-actions/changed-files/commit/1db97adba438afdc3741c78fd02aa2ac621332b0)) - (renovate[bot])
- **deps:** Lock file maintenance ([fb8f6db](https://github.com/tj-actions/changed-files/commit/fb8f6db383582a9d4ee2fadc1601db53b2fe1c2b)) - (renovate[bot])
- **deps:** Update dependency @types/node to v20.10.6 ([efd7ece](https://github.com/tj-actions/changed-files/commit/efd7ecef11e1ce94fc5121243c09ad2be618d175)) - (renovate[bot])
- **deps:** Update tj-actions/verify-changed-files action to v17 ([#1820](https://github.com/tj-actions/changed-files/issues/1820)) ([4f8e12c](https://github.com/tj-actions/changed-files/commit/4f8e12c0984394b03e7c4015292f8f644e2e5426)) - (renovate[bot])
- **deps:** Update typescript-eslint monorepo to v6.16.0 ([0f0747e](https://github.com/tj-actions/changed-files/commit/0f0747e79dd8b1e79730cb9aeb9adbc1d45b79da)) - (renovate[bot])
- Update matrix-test.yml ([#1814](https://github.com/tj-actions/changed-files/issues/1814)) ([0c2a758](https://github.com/tj-actions/changed-files/commit/0c2a758b81c9fe6c9dc0b17f46d87e68707e8054)) - (Tonye Jack)
## <!-- 9 -->⬆️ Upgrades
- Upgraded to v41.0.1 ([#1816](https://github.com/tj-actions/changed-files/issues/1816))
Co-authored-by: jackton1 <jackton1@users.noreply.github.com> ([1b6d7b6](https://github.com/tj-actions/changed-files/commit/1b6d7b6fb62c81ae85b9114bbb15ebeb21c2833d)) - (tj-actions[bot])
# [41.0.1](https://github.com/tj-actions/changed-files/compare/v41.0.0...v41.0.1) - (2023-12-24)
## <!-- 1 -->🐛 Bug Fixes
- Update characters escaped by safe output ([#1815](https://github.com/tj-actions/changed-files/issues/1815)) ([716b1e1](https://github.com/tj-actions/changed-files/commit/716b1e13042866565e00e85fd4ec490e186c4a2f)) - (Tonye Jack)
## <!-- 7 -->⚙️ Miscellaneous Tasks
- **deps:** Update dependency eslint-plugin-prettier to v5.1.2 ([7aaf10d](https://github.com/tj-actions/changed-files/commit/7aaf10d9eef19e8a2432a967b88124171152caaf)) - (renovate[bot])
## <!-- 9 -->⬆️ Upgrades
- Upgraded to v41 ([#1811](https://github.com/tj-actions/changed-files/issues/1811))
Co-authored-by: jackton1 <jackton1@users.noreply.github.com> ([cc08e17](https://github.com/tj-actions/changed-files/commit/cc08e170f4447237bcaf8acaacfa615b9cb86612)) - (tj-actions[bot])
# [41.0.0](https://github.com/tj-actions/changed-files/compare/v40.2.3...v41.0.0) - (2023-12-23)
## <!-- 1 -->🐛 Bug Fixes
- Update safe output regex and the docs ([#1805](https://github.com/tj-actions/changed-files/issues/1805)) ([ff2f6e6](https://github.com/tj-actions/changed-files/commit/ff2f6e6b91913a7be42be1b5917330fe442f2ede)) - (tj-actions[bot])
## <!-- 11 -->⏪ Reverts
- Revert "chore(deps): update actions/download-artifact action to v4" ([#1806](https://github.com/tj-actions/changed-files/issues/1806))
([4f573fe](https://github.com/tj-actions/changed-files/commit/4f573fed06c9abb5da4c72f75c1c320718114ff7)) - (Tonye Jack)
## <!-- 26 -->🔄 Update
- Update README.md ([6e79d6e](https://github.com/tj-actions/changed-files/commit/6e79d6e3dbe48946636c2939c80ff5c84ff7f9fe)) - (Tonye Jack)
- Update README.md ([d13ac19](https://github.com/tj-actions/changed-files/commit/d13ac1942fb3c1d7d32017915bb082cebe8a272a)) - (Tonye Jack)
- Update README.md ([bb89f97](https://github.com/tj-actions/changed-files/commit/bb89f97963be96b39e1a303e64d5b91a1af4c340)) - (Tonye Jack)
- Updated README.md ([#1810](https://github.com/tj-actions/changed-files/issues/1810))
Co-authored-by: renovate[bot] <renovate[bot]@users.noreply.github.com> ([1864078](https://github.com/tj-actions/changed-files/commit/1864078d0afadf68ba489e671ecc09fefe8b70ab)) - (tj-actions[bot])
- Update README.md ([#1808](https://github.com/tj-actions/changed-files/issues/1808))
([47371c5](https://github.com/tj-actions/changed-files/commit/47371c50e97c089212d9eb92ca26c8453224e78e)) - (Tonye Jack)
## <!-- 30 -->📝 Other
- Merge pull request from GHSA-mcph-m25j-8j63
* feat: add `safe_output` input enabled by default
* fix: migrate README to safe uses of interpolation
* fix: README `uses` typo
* fix: README examples to account for newlines
* fix: README examples missing `safe_output`
* fix: remove sanitization of `'`
* fix: also sanitize `|&;` ([0102c07](https://github.com/tj-actions/changed-files/commit/0102c07446a3cad972f4afcbd0ee4dbc4b6d2d1b)) - (Jorge)
## <!-- 7 -->⚙️ Miscellaneous Tasks
- **deps:** Lock file maintenance ([f495a03](https://github.com/tj-actions/changed-files/commit/f495a0321d3fffa62da2573adf70b77d5eb2f57a)) - (renovate[bot])
- **deps:** Update dependency eslint-plugin-prettier to v5.1.1 ([089842a](https://github.com/tj-actions/changed-files/commit/089842a7a899531f61a45ef6ea69c485e1d62dbe)) - (renovate[bot])
- **deps:** Lock file maintenance ([787db06](https://github.com/tj-actions/changed-files/commit/787db0612e783421667a00319cf394b649682c4c)) - (renovate[bot])
- **deps:** Update dependency eslint-plugin-prettier to v5.1.0 ([4ef6b56](https://github.com/tj-actions/changed-files/commit/4ef6b56482141a958bd3efb05520e4df9ecf4147)) - (renovate[bot])
- **deps:** Update typescript-eslint monorepo to v6.15.0 ([c9ae347](https://github.com/tj-actions/changed-files/commit/c9ae347dbba64d95d83f36a0568e0e25a688dd1f)) - (renovate[bot])
## <!-- 9 -->⬆️ Upgrades
- Upgraded to v40.2.3 ([#1800](https://github.com/tj-actions/changed-files/issues/1800))
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com> ([f9480db](https://github.com/tj-actions/changed-files/commit/f9480db177263c95588c5d9dae7c78f97d39242a)) - (tj-actions[bot])
# [40.2.3](https://github.com/tj-actions/changed-files/compare/v40.2.2...v40.2.3) - (2023-12-18)
## <!-- 16 --> Add

136
README.md
View File

@@ -3,19 +3,19 @@
[![Windows](https://img.shields.io/badge/Windows-0078D6?style=for-the-badge\&logo=windows\&logoColor=white)](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on)
[![Public workflows that use this action.](https://img.shields.io/endpoint?style=for-the-badge\&url=https%3A%2F%2Fused-by.vercel.app%2Fapi%2Fgithub-actions%2Fused-by%3Faction%3Dtj-actions%2Fchanged-files%26badge%3Dtrue)](https://github.com/search?o=desc\&q=tj-actions+changed-files+language%3AYAML\&s=\&type=Code)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/4a625e9b62794b5b98e169c15c0e673c)](https://app.codacy.com/gh/tj-actions/changed-files/dashboard?utm_source=gh\&utm_medium=referral\&utm_content=\&utm_campaign=Badge_grade)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/4fe2f49c3ab144b0bbe4effc85a061a0)](https://app.codacy.com/gh/tj-actions/changed-files/dashboard?utm_source=gh\&utm_medium=referral\&utm_content=\&utm_campaign=Badge_grade)
[![CI](https://github.com/tj-actions/changed-files/actions/workflows/test.yml/badge.svg)](https://github.com/tj-actions/changed-files/actions/workflows/test.yml)
[![Update release version.](https://github.com/tj-actions/changed-files/actions/workflows/sync-release-version.yml/badge.svg)](https://github.com/tj-actions/changed-files/actions/workflows/sync-release-version.yml)
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![All Contributors](https://img.shields.io/badge/all_contributors-22-orange.svg?style=flat-square)](#contributors-)
[![All Contributors](https://img.shields.io/badge/all_contributors-26-orange.svg?style=flat-square)](#contributors-)
<!-- ALL-CONTRIBUTORS-BADGE:END -->
## changed-files
Effortlessly track all changed files and directories relative to a target branch, preceding commit or the last remote commit returning **relative paths** from the project root using this GitHub action.
Effortlessly track all changed files and directories relative to a target branch, the current branch (preceding commit or the last remote commit), multiple branches, or custom commits returning **relative paths** from the project root using this GitHub action.
> \[!NOTE]
>
@@ -28,7 +28,7 @@ Effortlessly track all changed files and directories relative to a target branch
* [Features 🚀](#features-)
* [Usage 💻](#usage-)
* [On `pull_request` 🔀](#on-pull_request-)
* [Using local .git history 📁](#using-local-git-history-)
* [Using local .git directory 📁](#using-local-git-directory-)
* [Using Github's API :octocat:](#using-githubs-api-octocat)
* [On `push` ⬆️](#on-push-)
* [Other supported events :electron:](#other-supported-events-electron)
@@ -54,7 +54,7 @@ Effortlessly track all changed files and directories relative to a target branch
* Scales to handle large/mono repositories.
* Supports Git submodules.
* Supports [merge queues](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-a-merge-queue) for pull requests.
* Generates escaped [JSON output for running matrix jobs](https://github.com/tj-actions/changed-files/blob/main/.github/workflows/matrix-test.yml) based on changed files.
* Generates escaped [JSON output for running matrix jobs](https://github.com/tj-actions/changed-files/blob/main/.github/workflows/matrix-example.yml) based on changed files.
* Lists changed directories.
* Limits matching changed directories to a specified maximum depth.
* Optionally excludes the current directory.
@@ -97,7 +97,7 @@ Visit the [discussions for more information](https://github.com/tj-actions/chang
Detect changes to all files in a Pull request relative to the target branch or since the last pushed commit.
#### Using local .git history 📁
#### Using local .git directory 📁
```yaml
name: CI
@@ -119,10 +119,12 @@ jobs:
with:
fetch-depth: 0 # OR "2" -> To retrieve the preceding commit.
# -----------------------------------------------------------------------------------------------------------
# Example 1
# -----------------------------------------------------------------------------------------------------------
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v40
uses: tj-actions/changed-files@v42
# To compare changes between the current commit and the last pushed remote commit set `since_last_remote_commit: true`. e.g
# with:
# since_last_remote_commit: true
@@ -131,14 +133,16 @@ jobs:
env:
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
for file in "$ALL_CHANGED_FILES"; do
for file in ${ALL_CHANGED_FILES}; do
echo "$file was changed"
done
# -----------------------------------------------------------------------------------------------------------
# Example 2
# -----------------------------------------------------------------------------------------------------------
- name: Get all changed markdown files
id: changed-markdown-files
uses: tj-actions/changed-files@v40
uses: tj-actions/changed-files@v42
with:
# Avoid using single or double quotes for multiline patterns
files: |
@@ -149,20 +153,21 @@ jobs:
env:
ALL_CHANGED_FILES: ${{ steps.changed-markdown-files.outputs.all_changed_files }}
run: |
for file in "$ALL_CHANGED_FILES"; do
for file in ${ALL_CHANGED_FILES}; do
echo "$file was changed"
done
# -----------------------------------------------------------------------------------------------------------
# Example 3
# -----------------------------------------------------------------------------------------------------------
- name: Get all test, doc and src files that have changed
id: changed-files-yaml
uses: tj-actions/changed-files@v40
uses: tj-actions/changed-files@v42
with:
files_yaml: |
doc:
- '**.md'
- docs/**
- README.md
test:
- test/**
- '!test/**.md'
@@ -187,10 +192,12 @@ jobs:
echo "One or more doc file(s) has changed."
echo "List all the files that have changed: $DOC_ALL_CHANGED_FILES"
# Example 3
# -----------------------------------------------------------------------------------------------------------
# Example 4
# -----------------------------------------------------------------------------------------------------------
- name: Get changed files in the docs folder
id: changed-files-specific
uses: tj-actions/changed-files@v40
uses: tj-actions/changed-files@v42
with:
files: docs/*.{js,html} # Alternatively using: `docs/**`
files_ignore: docs/static.js
@@ -232,13 +239,13 @@ jobs:
steps:
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v40
uses: tj-actions/changed-files@v42
- name: List all changed files
env:
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
for file in "$ALL_CHANGED_FILES"; do
for file in ${ALL_CHANGED_FILES}; do
echo "$file was changed"
done
```
@@ -275,14 +282,14 @@ jobs:
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v40
uses: tj-actions/changed-files@v42
# NOTE: `since_last_remote_commit: true` is implied by default and falls back to the previous local commit.
- name: List all changed files
env:
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
for file in "$ALL_CHANGED_FILES"; do
for file in ${ALL_CHANGED_FILES}; do
echo "$file was changed"
done
...
@@ -293,6 +300,7 @@ jobs:
* [schedule](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule)
* [release](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#release)
* [workflow\_dispatch](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_dispatch)
* [workflow\_run](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_run)
* [merge\_group](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#merge_group)
* [issue\_comment](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#issue_comment)
* ...and many more
@@ -313,14 +321,15 @@ Support this project with a :star:
>
> * When using `files_yaml*` inputs:
> * All keys must start with a letter or `_` and contain only alphanumeric characters, `-`, or `_`.
> For example, `test` or `test_key` or `tesT-key` are all valid.
>
> For example, `test` or `test_key` or `test-key` or `_test_key` are all valid.
## Inputs ⚙️
<!-- AUTO-DOC-INPUT:START - Do not remove or modify this section -->
```yaml
- uses: tj-actions/changed-files@v40
- uses: tj-actions/changed-files@v42
id: changed-files
with:
# Github API URL.
@@ -479,7 +488,7 @@ Support this project with a :star:
# Output list of changed files in a JSON formatted
# string which can be used for matrix jobs. Example:
# https://github.com/tj-actions/changed-files/blob/main/.github/workflows/matrix-test.yml
# https://github.com/tj-actions/changed-files/blob/main/.github/workflows/matrix-example.yml
# Type: boolean
# Default: "false"
json: ''
@@ -603,6 +612,12 @@ Support this project with a :star:
# Type: string
until: ''
# Force the use of Github's REST API even when
# a local copy of the repository exists
# Type: boolean
# Default: "false"
use_rest_api: ''
# Write outputs to the `output_dir` defaults to `.github/outputs` folder.
# NOTE: This creates a `.txt` file by default and
# a `.json` file if `json` is set to `true`.
@@ -650,7 +665,7 @@ Support this project with a :star:
| <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>*includes a combination of all added, copied, modified and renamed files (ACMR)*. |
| <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 have changed. i.e. <br>*includes 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. *includes a combination of all added, copied, modified, renamed, and deleted files (ACMRD)*. |
| <a name="output_changed_keys"></a>[changed\_keys](#output_changed_keys) | string | Returns all changed YAML keys <br>when the `files_yaml` input is <br>used. i.e. *key that contains any path that has either been added, copied, modified, and renamed (ACMR)* |
@@ -661,7 +676,7 @@ Support this project with a :star:
| <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_modified_keys"></a>[modified\_keys](#output_modified_keys) | string | Returns all modified YAML keys <br>when the `files_yaml` input is <br>used. i.e. *key that contains any path that has either been added, copied, modified, and deleted (ACMRD)* |
| <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. *includes a combination of all added, copied, modified and renamed files (ACMR)*. |
| <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>have changed. i.e. *includes 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. *includes a combination of all added, copied, modified and renamed files (ACMR)*. |
@@ -702,7 +717,7 @@ The format of the version string is as follows:
...
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v40
uses: tj-actions/changed-files@v42
...
```
@@ -715,7 +730,7 @@ The format of the version string is as follows:
...
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v40
uses: tj-actions/changed-files@v42
with:
safe_output: false # set to false because we are using an environment variable to store the output and avoid command injection.
@@ -723,7 +738,7 @@ The format of the version string is as follows:
env:
ADDED_FILES: ${{ steps.changed-files.outputs.added_files }}
run: |
for file in "$ADDED_FILES"; do
for file in ${ADDED_FILES}; do
echo "$file was added"
done
...
@@ -738,7 +753,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@v40
uses: tj-actions/changed-files@v42
with:
separator: ","
...
@@ -755,13 +770,13 @@ See [inputs](#inputs) for more information.
...
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v40
uses: tj-actions/changed-files@v42
- name: List all added files
env:
ADDED_FILES: ${{ steps.changed-files.outputs.added_files }}
run: |
for file in "$ADDED_FILES"; do
for file in ${ADDED_FILES}; do
echo "$file was added"
done
...
@@ -778,7 +793,7 @@ See [outputs](#outputs) for a list of all available outputs.
...
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v40
uses: tj-actions/changed-files@v42
- name: Run a step if my-file.txt was modified
if: contains(steps.changed-files.outputs.modified_files, 'my-file.txt')
@@ -799,7 +814,7 @@ See [outputs](#outputs) for a list of all available outputs.
- name: Get changed files and write the outputs to a Txt file
id: changed-files-write-output-files-txt
uses: tj-actions/changed-files@v40
uses: tj-actions/changed-files@v42
with:
write_output_files: true
@@ -818,7 +833,7 @@ See [outputs](#outputs) for a list of all available outputs.
...
- name: Get changed files and write the outputs to a JSON file
id: changed-files-write-output-files-json
uses: tj-actions/changed-files@v40
uses: tj-actions/changed-files@v42
with:
json: true
write_output_files: true
@@ -838,7 +853,7 @@ See [outputs](#outputs) for a list of all available outputs.
...
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v40
uses: tj-actions/changed-files@v42
with:
files: |
my-file.txt
@@ -861,7 +876,7 @@ See [inputs](#inputs) for more information.
...
- name: Get changed files
id: changed-files-specific
uses: tj-actions/changed-files@v40
uses: tj-actions/changed-files@v42
with:
files: |
my-file.txt
@@ -886,7 +901,7 @@ See [inputs](#inputs) for more information.
env:
DELETED_FILES: ${{ steps.changed-files-specific.outputs.deleted_files }}
run: |
for file in "$DELETED_FILES"; do
for file in ${DELETED_FILES}; do
echo "$file was deleted"
done
@@ -895,7 +910,7 @@ See [inputs](#inputs) for more information.
env:
DELETED_FILES: ${{ steps.changed-files-specific.outputs.deleted_files }}
run: |
for file in "$DELETED_FILES"; do
for file in ${DELETED_FILES}; do
echo "$file was deleted"
done
...
@@ -912,7 +927,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@v40
uses: tj-actions/changed-files@v42
with:
files_from_source_file: test/changed-files-list.txt
...
@@ -929,7 +944,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@v40
uses: tj-actions/changed-files@v42
with:
files_from_source_file: |
test/changed-files-list.txt
@@ -950,7 +965,7 @@ See [inputs](#inputs) for more information.
...
- name: Get changed files using a different SHA
id: changed-files
uses: tj-actions/changed-files@v40
uses: tj-actions/changed-files@v42
with:
sha: ${{ github.event.pull_request.head.sha }}
...
@@ -967,7 +982,7 @@ See [inputs](#inputs) for more information.
...
- name: Get changed files using a different base SHA
id: changed-files
uses: tj-actions/changed-files@v40
uses: tj-actions/changed-files@v42
with:
base_sha: ${{ github.event.pull_request.base.sha }}
...
@@ -999,13 +1014,18 @@ jobs:
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v40
uses: tj-actions/changed-files@v42
- name: List changed files
env:
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
echo "List all the files that have changed: $ALL_CHANGED_FILES"
- name: Get changed files in the .github folder
id: changed-files-specific
uses: tj-actions/changed-files@v40
uses: tj-actions/changed-files@v42
with:
base_sha: ${{ steps.get-base-sha.outputs.base_sha }}
files: .github/**
- name: Run step if any file(s) in the .github folder change
@@ -1035,7 +1055,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@v40
uses: tj-actions/changed-files@v42
with:
path: dir1
@@ -1044,7 +1064,7 @@ See [inputs](#inputs) for more information.
ADDED_FILES: |-
${{ steps.changed-files-for-dir1.outputs.added_files }}
run: |
for file in "$ADDED_FILES"; do
for file in ${ADDED_FILES}; do
echo "$file was added"
done
...
@@ -1061,13 +1081,13 @@ See [inputs](#inputs) for more information.
...
- name: Run changed-files with quotepath disabled
id: changed-files-quotepath
uses: tj-actions/changed-files@v40
uses: tj-actions/changed-files@v42
with:
quotepath: "false"
- name: Run changed-files with quotepath disabled for a specified list of file(s)
id: changed-files-quotepath-specific
uses: tj-actions/changed-files@v40
uses: tj-actions/changed-files@v42
with:
files: test/test-è.txt
quotepath: "false"
@@ -1100,7 +1120,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@v40
uses: tj-actions/changed-files@v42
with:
base_sha: ${{ steps.last_successful_commit_push.outputs.base }}
...
@@ -1127,7 +1147,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@v40
uses: tj-actions/changed-files@v42
with:
base_sha: ${{ steps.last_successful_commit_pull_request.outputs.base }}
...
@@ -1153,7 +1173,7 @@ See [inputs](#inputs) for more information.
...
- name: Run changed-files with dir_names
id: changed-files-dir-names
uses: tj-actions/changed-files@v40
uses: tj-actions/changed-files@v42
with:
dir_names: "true"
...
@@ -1170,7 +1190,7 @@ See [inputs](#inputs) for more information.
...
- name: Run changed-files with JSON output
id: changed-files-json
uses: tj-actions/changed-files@v40
uses: tj-actions/changed-files@v42
with:
json: "true"
...
@@ -1187,13 +1207,13 @@ See [inputs](#inputs) for more information.
...
- name: Get changed-files since 2022-08-19
id: changed-files-since
uses: tj-actions/changed-files@v40
uses: tj-actions/changed-files@v42
with:
since: "2022-08-19"
- name: Get changed-files until 2022-08-20
id: changed-files-until
uses: tj-actions/changed-files@v40
uses: tj-actions/changed-files@v42
with:
until: "2022-08-20"
...
@@ -1213,7 +1233,7 @@ See [inputs](#inputs) for more information.
* [coder/code-server: uses tj-actions/changed-files to automate detecting changes and run steps based on the outcome](https://github.com/coder/code-server/blob/c32a31d802f679846876b8ad9aacff6cf7b5361d/.github/workflows/build.yaml#L48)
* [tldr-pages/tldr: uses tj-actions/changed-files to automate detecting spelling errors](https://github.com/tldr-pages/tldr/blob/main/.github/workflows/codespell.yml#L14)
* [tldr-pages/tldr: uses tj-actions/changed-files to automate detecting spelling errors](https://github.com/tldr-pages/tldr/blob/c1b714c55cb0048037b79a681a10d7f3ddb0164c/.github/workflows/codespell.yml#L18-L26)
* [nodejs/docker-node: uses tj-actions/changed-files to generate matrix jobs based on changes detected](https://github.com/nodejs/docker-node/blob/3c4fa6daf06a4786d202f2f610351837806a0380/.github/workflows/build-test.yml#L29)
@@ -1221,10 +1241,12 @@ See [inputs](#inputs) for more information.
* [aws-doc-sdk-examples: uses tj-actions/changed-files to automate testing](https://github.com/awsdocs/aws-doc-sdk-examples/blob/2393723ef6b0cad9502f4852f5c72f7be58ca89d/.github/workflows/javascript.yml#L22)
* [nhost: uses tj-actions/changed-files to automate testing based on changes detected](https://github.com/nhost/nhost/blob/main/.github/workflows/ci.yaml#L44-L48)
* [nhost: uses tj-actions/changed-files to automate testing based on changes detected](https://github.com/nhost/nhost/blob/71a8ce444618a8ac4d660518172fba4883c4014b/.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)
* [argo-workflows uses tj-actions/changed-files to run specific jobs based on changes detected](https://github.com/argoproj/argo-workflows/blob/baef4856ff2603c76dbe277c825eaa3f9788fc91/.github/workflows/ci-build.yaml#L34)
And many more...
### Scalability Example 📈
@@ -1322,6 +1344,10 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/rodrigorfk"><img src="https://avatars.githubusercontent.com/u/1995033?v=4?s=100" width="100px;" alt="Rodrigo Fior Kuntzer"/><br /><sub><b>Rodrigo Fior Kuntzer</b></sub></a><br /><a href="https://github.com/tj-actions/changed-files/commits?author=rodrigorfk" title="Code">💻</a> <a href="https://github.com/tj-actions/changed-files/commits?author=rodrigorfk" title="Tests">⚠️</a> <a href="https://github.com/tj-actions/changed-files/issues?q=author%3Arodrigorfk" title="Bug reports">🐛</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/levenleven"><img src="https://avatars.githubusercontent.com/u/6463364?v=4?s=100" width="100px;" alt="Aleksey Levenstein"/><br /><sub><b>Aleksey Levenstein</b></sub></a><br /><a href="https://github.com/tj-actions/changed-files/commits?author=levenleven" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/dan-hill2802"><img src="https://avatars.githubusercontent.com/u/5046322?v=4?s=100" width="100px;" alt="Daniel Hill"/><br /><sub><b>Daniel Hill</b></sub></a><br /><a href="https://github.com/tj-actions/changed-files/commits?author=dan-hill2802" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://keisukeyamashita.com"><img src="https://avatars.githubusercontent.com/u/23056537?v=4?s=100" width="100px;" alt="KeisukeYamashita"/><br /><sub><b>KeisukeYamashita</b></sub></a><br /><a href="https://github.com/tj-actions/changed-files/commits?author=KeisukeYamashita" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/codesculpture"><img src="https://avatars.githubusercontent.com/u/63452117?v=4?s=100" width="100px;" alt="Aravind"/><br /><sub><b>Aravind</b></sub></a><br /><a href="https://github.com/tj-actions/changed-files/commits?author=codesculpture" title="Code">💻</a> <a href="https://github.com/tj-actions/changed-files/issues?q=author%3Acodesculpture" title="Bug reports">🐛</a></td>
</tr>
</tbody>
</table>

View File

@@ -127,7 +127,7 @@ inputs:
required: false
default: "false"
json:
description: "Output list of changed files in a JSON formatted string which can be used for matrix jobs. Example: https://github.com/tj-actions/changed-files/blob/main/.github/workflows/matrix-test.yml"
description: "Output list of changed files in a JSON formatted string which can be used for matrix jobs. Example: https://github.com/tj-actions/changed-files/blob/main/.github/workflows/matrix-example.yml"
required: false
default: "false"
escape_json:
@@ -203,6 +203,10 @@ inputs:
description: "Github API URL."
required: false
default: ${{ github.api_url }}
use_rest_api:
description: "Force the use of Github's REST API even when a local copy of the repository exists"
required: false
default: "false"
fail_on_initial_diff_error:
description: "Fail when the initial diff fails."
required: false
@@ -262,9 +266,9 @@ outputs:
all_changed_files_count:
description: "Returns the number of `all_changed_files`"
any_changed:
description: "Returns `true` when any of the filenames provided using the `files*` or `files_ignore*` inputs has changed. i.e. *includes a combination of all added, copied, modified and renamed files (ACMR)*."
description: "Returns `true` when any of the filenames provided using the `files*` or `files_ignore*` inputs have changed. i.e. *includes a combination of all added, copied, modified and renamed files (ACMR)*."
only_changed:
description: "Returns `true` when only files provided using the `files*` or `files_ignore*` inputs has changed. i.e. *includes a combination of all added, copied, modified and renamed files (ACMR)*."
description: "Returns `true` when only files provided using the `files*` or `files_ignore*` inputs have changed. i.e. *includes a combination of all added, copied, modified and renamed files (ACMR)*."
other_changed_files:
description: "Returns all other changed files not listed in the files input i.e. *includes a combination of all added, copied, modified and renamed files (ACMR)*."
other_changed_files_count:

197
dist/index.js generated vendored
View File

@@ -157,7 +157,7 @@ const getRenamedFiles = ({ inputs, workingDirectory, hasSubmodule, diffResult, s
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) {
if (inputs.fetchAdditionalSubmoduleHistory) {
message = `To fetch additional submodule history for: ${submodulePath} you can increase history depth using 'fetch_depth' input`;
}
core.info(message);
@@ -199,7 +199,7 @@ var ChangeTypeEnum;
ChangeTypeEnum["Unmerged"] = "U";
ChangeTypeEnum["Unknown"] = "X";
})(ChangeTypeEnum || (exports.ChangeTypeEnum = ChangeTypeEnum = {}));
const getAllDiffFiles = ({ workingDirectory, hasSubmodule, diffResult, submodulePaths, outputRenamedFilesAsDeletedAndAdded, fetchSubmoduleHistory, failOnInitialDiffError, failOnSubmoduleDiffError }) => __awaiter(void 0, void 0, void 0, function* () {
const getAllDiffFiles = ({ workingDirectory, hasSubmodule, diffResult, submodulePaths, outputRenamedFilesAsDeletedAndAdded, fetchAdditionalSubmoduleHistory, failOnInitialDiffError, failOnSubmoduleDiffError }) => __awaiter(void 0, void 0, void 0, function* () {
const files = yield (0, utils_1.getAllChangedFiles)({
cwd: workingDirectory,
sha1: diffResult.previousSha,
@@ -227,7 +227,7 @@ const getAllDiffFiles = ({ workingDirectory, hasSubmodule, diffResult, submodule
diff
}))) {
let message = `Set 'fetch_additional_submodule_history: true' to fetch additional submodule history for: ${submodulePath}`;
if (fetchSubmoduleHistory) {
if (fetchAdditionalSubmoduleHistory) {
message = `To fetch additional submodule history for: ${submodulePath} you can increase history depth using 'fetch_depth' input`;
}
core.warning(message);
@@ -981,7 +981,7 @@ const getSHAForNonPullRequestEvent = (inputs, env, workingDirectory, isShallow,
}
}
else {
if (hasSubmodule && inputs.fetchSubmoduleHistory) {
if (hasSubmodule && inputs.fetchAdditionalSubmoduleHistory) {
yield (0, utils_1.gitFetchSubmodules)({
cwd: workingDirectory,
args: [
@@ -1108,7 +1108,7 @@ const getSHAForNonPullRequestEvent = (inputs, env, workingDirectory, isShallow,
});
exports.getSHAForNonPullRequestEvent = getSHAForNonPullRequestEvent;
const getSHAForPullRequestEvent = (inputs, env, workingDirectory, isShallow, hasSubmodule, gitFetchExtraArgs) => __awaiter(void 0, void 0, void 0, function* () {
var _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0;
var _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1;
let targetBranch = (_m = (_l = github.context.payload.pull_request) === null || _l === void 0 ? void 0 : _l.base) === null || _m === void 0 ? void 0 : _m.ref;
const currentBranch = (_p = (_o = github.context.payload.pull_request) === null || _o === void 0 ? void 0 : _o.head) === null || _p === void 0 ? void 0 : _p.ref;
if (inputs.sinceLastRemoteCommit) {
@@ -1170,7 +1170,7 @@ const getSHAForPullRequestEvent = (inputs, env, workingDirectory, isShallow, has
}
}
else {
if (hasSubmodule && inputs.fetchSubmoduleHistory) {
if (hasSubmodule && inputs.fetchAdditionalSubmoduleHistory) {
yield (0, utils_1.gitFetchSubmodules)({
cwd: workingDirectory,
args: [
@@ -1207,7 +1207,7 @@ const getSHAForPullRequestEvent = (inputs, env, workingDirectory, isShallow, has
};
}
if (!((_s = (_r = github.context.payload.pull_request) === null || _r === void 0 ? void 0 : _r.base) === null || _s === void 0 ? void 0 : _s.ref) ||
((_u = (_t = github.context.payload.head) === null || _t === void 0 ? void 0 : _t.repo) === null || _u === void 0 ? void 0 : _u.fork) === 'true') {
((_v = (_u = (_t = github.context.payload.pull_request) === null || _t === void 0 ? void 0 : _t.head) === null || _u === void 0 ? void 0 : _u.repo) === null || _v === void 0 ? void 0 : _v.fork) === true) {
diff = '..';
}
if (!previousSha || previousSha === currentSha) {
@@ -1249,7 +1249,7 @@ const getSHAForPullRequestEvent = (inputs, env, workingDirectory, isShallow, has
}
else {
if (github.context.payload.action === 'closed') {
previousSha = (_w = (_v = github.context.payload.pull_request) === null || _v === void 0 ? void 0 : _v.base) === null || _w === void 0 ? void 0 : _w.sha;
previousSha = (_x = (_w = github.context.payload.pull_request) === null || _w === void 0 ? void 0 : _w.base) === null || _x === void 0 ? void 0 : _x.sha;
}
else {
previousSha = yield (0, utils_1.getRemoteBranchHeadSha)({
@@ -1257,7 +1257,7 @@ const getSHAForPullRequestEvent = (inputs, env, workingDirectory, isShallow, has
branch: targetBranch
});
if (!previousSha) {
previousSha = (_y = (_x = github.context.payload.pull_request) === null || _x === void 0 ? void 0 : _x.base) === null || _y === void 0 ? void 0 : _y.sha;
previousSha = (_z = (_y = github.context.payload.pull_request) === null || _y === void 0 ? void 0 : _y.base) === null || _z === void 0 ? void 0 : _z.sha;
}
}
if (isShallow) {
@@ -1295,7 +1295,7 @@ const getSHAForPullRequestEvent = (inputs, env, workingDirectory, isShallow, has
}
}
if (!previousSha || previousSha === currentSha) {
previousSha = (_0 = (_z = github.context.payload.pull_request) === null || _z === void 0 ? void 0 : _z.base) === null || _0 === void 0 ? void 0 : _0.sha;
previousSha = (_1 = (_0 = github.context.payload.pull_request) === null || _0 === void 0 ? void 0 : _0.base) === null || _1 === void 0 ? void 0 : _1.sha;
}
}
if (!(yield (0, utils_1.canDiffCommits)({
@@ -1350,6 +1350,39 @@ const getSHAForPullRequestEvent = (inputs, env, workingDirectory, isShallow, has
exports.getSHAForPullRequestEvent = getSHAForPullRequestEvent;
/***/ }),
/***/ 2363:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.DEFAULT_VALUES_OF_UNSUPPORTED_API_INPUTS = void 0;
exports.DEFAULT_VALUES_OF_UNSUPPORTED_API_INPUTS = {
sha: '',
baseSha: '',
since: '',
until: '',
path: '.',
quotepath: true,
diffRelative: true,
sinceLastRemoteCommit: false,
recoverDeletedFiles: false,
recoverDeletedFilesToDestination: '',
recoverFiles: '',
recoverFilesSeparator: '\n',
recoverFilesIgnore: '',
recoverFilesIgnoreSeparator: '\n',
includeAllOldNewRenamedFiles: false,
oldNewSeparator: ',',
oldNewFilesSeparator: ' ',
skipInitialFetch: false,
fetchAdditionalSubmoduleHistory: false,
dirNamesDeletedFilesIncludeOnlyDeletedDirs: false
};
/***/ }),
/***/ 9763:
@@ -1393,7 +1426,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getEnv = void 0;
const core = __importStar(__nccwpck_require__(2186));
const getEnv = () => __awaiter(void 0, void 0, void 0, function* () {
core.debug(`Process Env: ${JSON.stringify(process.env, null, 2)}`);
core.debug(`Env: ${JSON.stringify(process.env, null, 2)}`);
return {
GITHUB_REF_NAME: process.env.GITHUB_REF_NAME || '',
GITHUB_REF: process.env.GITHUB_REF || '',
@@ -1491,7 +1524,7 @@ const getInputs = () => {
const since = core.getInput('since', { required: false });
const until = core.getInput('until', { required: false });
const path = core.getInput('path', { required: false });
const quotePath = core.getBooleanInput('quotepath', { required: false });
const quotepath = core.getBooleanInput('quotepath', { required: false });
const diffRelative = core.getBooleanInput('diff_relative', { required: false });
const dirNames = core.getBooleanInput('dir_names', { required: false });
const dirNamesMaxDepth = core.getInput('dir_names_max_depth', {
@@ -1538,7 +1571,7 @@ const getInputs = () => {
const skipInitialFetch = core.getBooleanInput('skip_initial_fetch', {
required: false
});
const fetchSubmoduleHistory = core.getBooleanInput('fetch_additional_submodule_history', {
const fetchAdditionalSubmoduleHistory = core.getBooleanInput('fetch_additional_submodule_history', {
required: false
});
const failOnInitialDiffError = core.getBooleanInput('fail_on_initial_diff_error', {
@@ -1553,6 +1586,9 @@ const getInputs = () => {
const negationPatternsFirst = core.getBooleanInput('negation_patterns_first', {
required: false
});
const useRestApi = core.getBooleanInput('use_rest_api', {
required: false
});
const inputs = {
files,
filesSeparator,
@@ -1577,7 +1613,7 @@ const getInputs = () => {
since,
until,
path,
quotePath,
quotepath,
diffRelative,
sinceLastRemoteCommit,
recoverDeletedFiles,
@@ -1590,7 +1626,7 @@ const getInputs = () => {
oldNewSeparator,
oldNewFilesSeparator,
skipInitialFetch,
fetchSubmoduleHistory,
fetchAdditionalSubmoduleHistory,
dirNamesDeletedFilesIncludeOnlyDeletedDirs,
// End Not Supported via REST API
dirNames,
@@ -1605,7 +1641,8 @@ const getInputs = () => {
outputRenamedFilesAsDeletedAndAdded,
token,
apiUrl,
negationPatternsFirst
negationPatternsFirst,
useRestApi
};
if (fetchDepth) {
inputs.fetchDepth = Math.max(parseInt(fetchDepth, 10), 2);
@@ -1673,13 +1710,13 @@ const utils_1 = __nccwpck_require__(918);
const getChangedFilesFromLocalGitHistory = ({ inputs, env, workingDirectory, filePatterns, yamlFilePatterns }) => __awaiter(void 0, void 0, void 0, function* () {
var _a, _b, _c;
yield (0, utils_1.verifyMinimumGitVersion)();
let quotePathValue = 'on';
if (!inputs.quotePath) {
quotePathValue = 'off';
let quotepathValue = 'on';
if (!inputs.quotepath) {
quotepathValue = 'off';
}
yield (0, utils_1.updateGitGlobalConfig)({
name: 'core.quotepath',
value: quotePathValue
value: quotepathValue
});
if (inputs.diffRelative) {
yield (0, utils_1.updateGitGlobalConfig)({
@@ -1720,7 +1757,7 @@ const getChangedFilesFromLocalGitHistory = ({ inputs, env, workingDirectory, fil
diffResult,
submodulePaths,
outputRenamedFilesAsDeletedAndAdded,
fetchSubmoduleHistory: inputs.fetchSubmoduleHistory,
fetchAdditionalSubmoduleHistory: inputs.fetchAdditionalSubmoduleHistory,
failOnInitialDiffError: inputs.failOnInitialDiffError,
failOnSubmoduleDiffError: inputs.failOnSubmoduleDiffError
});
@@ -1793,7 +1830,7 @@ const getChangedFilesFromRESTAPI = ({ inputs, filePatterns, yamlFilePatterns })
});
});
function run() {
var _a;
var _a, _b;
return __awaiter(this, void 0, void 0, function* () {
core.startGroup('changed-files');
const env = yield (0, env_1.getEnv)();
@@ -1801,7 +1838,7 @@ function run() {
const inputs = (0, inputs_1.getInputs)();
core.debug(`Inputs: ${JSON.stringify(inputs, null, 2)}`);
core.debug(`Github Context: ${JSON.stringify(github.context, null, 2)}`);
const workingDirectory = path_1.default.resolve(env.GITHUB_WORKSPACE || process.cwd(), inputs.path);
const workingDirectory = path_1.default.resolve(env.GITHUB_WORKSPACE || process.cwd(), inputs.useRestApi ? '.' : inputs.path);
core.debug(`Working directory: ${workingDirectory}`);
const hasGitDirectory = yield (0, utils_1.hasLocalGitDirectory)({ workingDirectory });
core.debug(`Has git directory: ${hasGitDirectory}`);
@@ -1815,30 +1852,14 @@ function run() {
workingDirectory
});
core.debug(`Yaml file patterns: ${JSON.stringify(yamlFilePatterns)}`);
if (inputs.useRestApi && !((_a = github.context.payload.pull_request) === null || _a === void 0 ? void 0 : _a.number)) {
throw new Error("Only pull_request* events are supported when using GitHub's REST API.");
}
if (inputs.token &&
((_a = github.context.payload.pull_request) === null || _a === void 0 ? void 0 : _a.number) &&
!hasGitDirectory) {
((_b = github.context.payload.pull_request) === null || _b === void 0 ? void 0 : _b.number) &&
(!hasGitDirectory || inputs.useRestApi)) {
core.info("Using GitHub's REST API to get changed files");
const unsupportedInputs = [
'sha',
'baseSha',
'since',
'until',
'sinceLastRemoteCommit',
'recoverDeletedFiles',
'recoverDeletedFilesToDestination',
'recoverFiles',
'recoverFilesIgnore',
'includeAllOldNewRenamedFiles',
'skipInitialFetch',
'fetchSubmoduleHistory',
'dirNamesDeletedFilesIncludeOnlyDeletedDirs'
];
for (const input of unsupportedInputs) {
if (inputs[input]) {
core.warning(`Input "${input}" is not supported when using GitHub's REST API to get changed files`);
}
}
yield (0, utils_1.warnUnsupportedRESTAPIInputs)({ inputs });
yield getChangedFilesFromRESTAPI({
inputs,
filePatterns,
@@ -1847,8 +1868,7 @@ function run() {
}
else {
if (!hasGitDirectory) {
core.setFailed("Can't find local .git directory. Please run actions/checkout before this action");
return;
throw new Error(`Unable to locate the git repository in the given path: ${workingDirectory}.\n Please run actions/checkout before this action (Make sure the 'path' input is correct).\n If you intend to use Github's REST API note that only pull_request* events are supported. Current event is "${github.context.eventName}".`);
}
core.info('Using local .git directory');
yield getChangedFilesFromLocalGitHistory({
@@ -1867,6 +1887,7 @@ if (!process.env.TESTING) {
// eslint-disable-next-line github/no-then
run().catch(e => {
core.setFailed(e.message || e);
process.exit(1);
});
}
@@ -1934,19 +1955,19 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.hasLocalGitDirectory = exports.recoverDeletedFiles = exports.setOutput = exports.setArrayOutput = exports.getOutputKey = exports.getRecoverFilePatterns = exports.getYamlFilePatterns = exports.getFilePatterns = exports.getDirNamesIncludeFilesPattern = exports.jsonOutput = exports.getDirnameMaxDepth = exports.canDiffCommits = exports.getPreviousGitTag = exports.cleanShaInput = exports.verifyCommitSha = exports.getParentSha = exports.getCurrentBranchName = exports.getRemoteBranchHeadSha = exports.isInsideWorkTree = exports.getHeadSha = exports.gitLog = exports.getFilteredChangedFiles = exports.getAllChangedFiles = exports.gitRenamedFiles = exports.gitSubmoduleDiffSHA = exports.getSubmodulePath = exports.gitFetchSubmodules = exports.gitFetch = exports.submoduleExists = exports.isRepoShallow = exports.updateGitGlobalConfig = exports.exists = exports.verifyMinimumGitVersion = exports.getDirname = exports.normalizeSeparators = exports.isWindows = void 0;
exports.warnUnsupportedRESTAPIInputs = exports.hasLocalGitDirectory = exports.recoverDeletedFiles = exports.setOutput = exports.setArrayOutput = exports.getOutputKey = exports.getRecoverFilePatterns = exports.getYamlFilePatterns = exports.getFilePatterns = exports.getDirNamesIncludeFilesPattern = exports.jsonOutput = exports.getDirnameMaxDepth = exports.canDiffCommits = exports.getPreviousGitTag = exports.cleanShaInput = exports.verifyCommitSha = exports.getParentSha = exports.getCurrentBranchName = exports.getRemoteBranchHeadSha = exports.isInsideWorkTree = exports.getHeadSha = exports.gitLog = exports.getFilteredChangedFiles = exports.getAllChangedFiles = exports.gitRenamedFiles = exports.gitSubmoduleDiffSHA = exports.getSubmodulePath = exports.gitFetchSubmodules = exports.gitFetch = exports.submoduleExists = exports.isRepoShallow = exports.updateGitGlobalConfig = exports.exists = exports.verifyMinimumGitVersion = exports.getDirname = exports.normalizeSeparators = exports.isWindows = void 0;
/*global AsyncIterableIterator*/
const core = __importStar(__nccwpck_require__(2186));
const exec = __importStar(__nccwpck_require__(1514));
const github = __importStar(__nccwpck_require__(5438));
const fs_1 = __nccwpck_require__(7147);
const promises_1 = __nccwpck_require__(3292);
const lodash_1 = __nccwpck_require__(250);
const micromatch_1 = __importDefault(__nccwpck_require__(6228));
const path = __importStar(__nccwpck_require__(1017));
const readline_1 = __nccwpck_require__(4521);
const yaml_1 = __nccwpck_require__(4083);
const changedFiles_1 = __nccwpck_require__(7358);
const constant_1 = __nccwpck_require__(2363);
const MINIMUM_GIT_VERSION = '2.18.0';
const isWindows = () => {
return process.platform === 'win32';
@@ -2083,17 +2104,17 @@ function lineOfFileGenerator({ filePath, excludedFiles }) {
for (var _d = true, rl_1 = __asyncValues(rl), rl_1_1; rl_1_1 = yield __await(rl_1.next()), _a = rl_1_1.done, !_a; _d = true) {
_c = rl_1_1.value;
_d = false;
const line = _c;
let line = _c;
if (!line.startsWith('#') && line !== '') {
if (excludedFiles) {
if (line.startsWith('!')) {
yield yield __await(line);
}
else {
yield yield __await(`!${line}`);
line = line.startsWith('!') ? line : `!${line}`;
if (line.endsWith(path.sep)) {
line = `${line}**`;
}
yield yield __await(line);
}
else {
line = line.endsWith(path.sep) ? `${line}**` : line;
yield yield __await(line);
}
}
@@ -2187,6 +2208,7 @@ exports.submoduleExists = submoduleExists;
* Fetches the git repository
* @param args - arguments for fetch command
* @param cwd - working directory
* @returns exit code
*/
const gitFetch = ({ args, cwd }) => __awaiter(void 0, void 0, void 0, function* () {
const { exitCode } = yield exec.getExecOutput('git', ['fetch', '-q', ...args], {
@@ -2217,6 +2239,7 @@ exports.gitFetchSubmodules = gitFetchSubmodules;
/**
* Retrieves all the submodule paths
* @param cwd - working directory
* @returns submodule paths
*/
const getSubmodulePath = ({ cwd }) => __awaiter(void 0, void 0, void 0, function* () {
const { exitCode, stdout, stderr } = yield exec.getExecOutput('git', ['submodule', 'status'], {
@@ -2241,6 +2264,7 @@ exports.getSubmodulePath = getSubmodulePath;
* @param parentSha2 - parent commit sha
* @param submodulePath - path of submodule
* @param diff - diff type between parent commits (`..` or `...`)
* @returns commit sha of submodule
*/
const gitSubmoduleDiffSHA = ({ cwd, parentSha1, parentSha2, submodulePath, diff }) => __awaiter(void 0, void 0, void 0, function* () {
var _h, _j, _k, _l;
@@ -2432,6 +2456,9 @@ const isInsideWorkTree = ({ cwd }) => __awaiter(void 0, void 0, void 0, function
ignoreReturnCode: true,
silent: !core.isDebug()
});
if (stdout.trim() !== 'true') {
core.debug(`The current working directory is not inside a git repository: ${cwd}`);
}
return stdout.trim() === 'true';
});
exports.isInsideWorkTree = isInsideWorkTree;
@@ -2561,7 +2588,7 @@ const canDiffCommits = ({ cwd, sha1, sha2, diff }) => __awaiter(void 0, void 0,
return true;
}
else {
const { exitCode, stderr } = yield exec.getExecOutput('git', ['diff', '--quiet', sha1, sha2], {
const { exitCode, stderr } = yield exec.getExecOutput('git', ['diff', '--no-patch', sha1, sha2], {
cwd,
ignoreReturnCode: true,
silent: !core.isDebug()
@@ -2614,6 +2641,7 @@ const getFilePatterns = ({ inputs, workingDirectory }) => __awaiter(void 0, void
if (inputs.files) {
const filesPatterns = inputs.files
.split(inputs.filesSeparator)
.map(p => (p.endsWith(path.sep) ? `${p}**` : p))
.filter(Boolean);
cleanedFilePatterns.push(...filesPatterns);
core.debug(`files patterns: ${filesPatterns.join('\n')}`);
@@ -2635,8 +2663,9 @@ const getFilePatterns = ({ inputs, workingDirectory }) => __awaiter(void 0, void
.split(inputs.filesIgnoreSeparator)
.filter(Boolean)
.map(p => {
if (!p.startsWith('!')) {
p = `!${p}`;
p = p.startsWith('!') ? p : `!${p}`;
if (p.endsWith(path.sep)) {
p = `${p}**`;
}
return p;
});
@@ -2682,7 +2711,7 @@ const getYamlFilePatternsFromContents = ({ content = '', filePath = '', excluded
core.error(`File does not exist: ${filePath}`);
throw new Error(`File does not exist: ${filePath}`);
}
source = yield (0, promises_1.readFile)(filePath, 'utf8');
source = yield fs_1.promises.readFile(filePath, 'utf8');
}
else {
source = content;
@@ -2829,7 +2858,7 @@ const setOutput = ({ key, value, writeOutputFiles, outputDir, json = false, shou
}
// if safeOutput is true, escape special characters for bash shell
if (safeOutput) {
cleanedValue = cleanedValue.replace(/[^\x20-\x7E]|[:*?"<>|;`$()&!]/g, '\\$&');
cleanedValue = cleanedValue.replace(/[^\x20-\x7E]|[:*?<>|;`$()&!]/g, '\\$&');
}
core.setOutput(key, cleanedValue);
if (writeOutputFiles) {
@@ -2912,12 +2941,35 @@ const recoverDeletedFiles = ({ inputs, workingDirectory, deletedFiles, recoverPa
}
});
exports.recoverDeletedFiles = recoverDeletedFiles;
/**
* Determines whether the specified working directory has a local Git directory.
*
* @param workingDirectory - The path of the working directory.
* @returns A boolean value indicating whether the working directory has a local Git directory.
*/
const hasLocalGitDirectory = ({ workingDirectory }) => __awaiter(void 0, void 0, void 0, function* () {
return yield (0, exports.isInsideWorkTree)({
cwd: workingDirectory
});
});
exports.hasLocalGitDirectory = hasLocalGitDirectory;
/**
* Warns about unsupported inputs when using the REST API.
*
* @param inputs - The inputs object.
*/
const warnUnsupportedRESTAPIInputs = ({ inputs }) => __awaiter(void 0, void 0, void 0, function* () {
var _m, _o;
for (const key of Object.keys(constant_1.DEFAULT_VALUES_OF_UNSUPPORTED_API_INPUTS)) {
const defaultValue = Object.hasOwnProperty.call(constant_1.DEFAULT_VALUES_OF_UNSUPPORTED_API_INPUTS, key)
? (_m = constant_1.DEFAULT_VALUES_OF_UNSUPPORTED_API_INPUTS[key]) === null || _m === void 0 ? void 0 : _m.toString()
: '';
if (defaultValue !== ((_o = inputs[key]) === null || _o === void 0 ? void 0 : _o.toString())) {
core.warning(`Input "${(0, lodash_1.snakeCase)(key)}" is not supported when using GitHub's REST API to get changed files`);
}
}
});
exports.warnUnsupportedRESTAPIInputs = warnUnsupportedRESTAPIInputs;
/***/ }),
@@ -6360,7 +6412,7 @@ var import_graphql = __nccwpck_require__(8467);
var import_auth_token = __nccwpck_require__(334);
// pkg/dist-src/version.js
var VERSION = "5.0.2";
var VERSION = "5.1.0";
// pkg/dist-src/index.js
var noop = () => {
@@ -9676,7 +9728,7 @@ var import_endpoint = __nccwpck_require__(9440);
var import_universal_user_agent = __nccwpck_require__(5030);
// pkg/dist-src/version.js
var VERSION = "8.1.6";
var VERSION = "8.2.0";
// pkg/dist-src/is-plain-object.js
function isPlainObject(value) {
@@ -9820,11 +9872,17 @@ async function getResponseData(response) {
function toErrorMessage(data) {
if (typeof data === "string")
return data;
let suffix;
if ("documentation_url" in data) {
suffix = ` - ${data.documentation_url}`;
} else {
suffix = "";
}
if ("message" in data) {
if (Array.isArray(data.errors)) {
return `${data.message}: ${data.errors.map(JSON.stringify).join(", ")}`;
return `${data.message}: ${data.errors.map(JSON.stringify).join(", ")}${suffix}`;
}
return data.message;
return `${data.message}${suffix}`;
}
return `Unknown error: ${JSON.stringify(data)}`;
}
@@ -43925,6 +43983,9 @@ function httpRedirectFetch (fetchParams, response) {
// https://fetch.spec.whatwg.org/#cors-non-wildcard-request-header-name
request.headersList.delete('authorization')
// https://fetch.spec.whatwg.org/#authentication-entries
request.headersList.delete('proxy-authorization', true)
// "Cookie" and "Host" are forbidden request-headers, which undici doesn't implement.
request.headersList.delete('cookie')
request.headersList.delete('host')
@@ -54871,14 +54932,6 @@ module.exports = require("fs");
/***/ }),
/***/ 3292:
/***/ ((module) => {
"use strict";
module.exports = require("fs/promises");
/***/ }),
/***/ 3685:
/***/ ((module) => {

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long

View File

@@ -10,4 +10,4 @@ module.exports = {
setupFiles: [
"<rootDir>/jest/setupEnv.cjs"
]
}
};

View File

@@ -1,6 +1,6 @@
{
"name": "@tj-actions/changed-files",
"version": "40.2.3",
"version": "42.0.3",
"description": "Github action to retrieve all (added, copied, modified, deleted, renamed, type changed, unmerged, unknown) files and directories.",
"main": "lib/main.js",
"publishConfig": {
@@ -46,8 +46,8 @@
"@types/micromatch": "^4.0.2",
"@types/node": "^20.3.2",
"@types/uuid": "^9.0.2",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"@typescript-eslint/eslint-plugin": "^7.0.0",
"@typescript-eslint/parser": "^7.0.0",
"@vercel/ncc": "^0.38.0",
"eslint": "^8.43.0",
"eslint-plugin-github": "^4.8.0",

View File

@@ -1,9 +1,12 @@
import * as core from '@actions/core'
import {ChangeTypeEnum} from '../changedFiles'
import {Inputs} from '../inputs'
import {
getDirname,
getDirnameMaxDepth,
getFilteredChangedFiles,
normalizeSeparators
normalizeSeparators,
warnUnsupportedRESTAPIInputs
} from '../utils'
const originalPlatform = process.platform
@@ -575,4 +578,77 @@ describe('utils test', () => {
expect(filteredFiles[ChangeTypeEnum.Modified]).toEqual([])
})
})
describe('warnUnsupportedRESTAPIInputs', () => {
// Warns about unsupported inputs when using the REST API.
it('should warn about unsupported inputs when all inputs are supported', async () => {
const inputs: Inputs = {
files: '',
filesSeparator: '\n',
filesFromSourceFile: '',
filesFromSourceFileSeparator: '\n',
filesYaml: '',
filesYamlFromSourceFile: '',
filesYamlFromSourceFileSeparator: '\n',
filesIgnore: '',
filesIgnoreSeparator: '\n',
filesIgnoreFromSourceFile: '',
filesIgnoreFromSourceFileSeparator: '\n',
filesIgnoreYaml: '',
filesIgnoreYamlFromSourceFile: '',
filesIgnoreYamlFromSourceFileSeparator: '\n',
separator: ' ',
includeAllOldNewRenamedFiles: false,
oldNewSeparator: ',',
oldNewFilesSeparator: ' ',
sha: '1313123',
baseSha: '',
since: '',
until: '',
path: '.',
quotepath: true,
diffRelative: true,
dirNames: false,
dirNamesMaxDepth: undefined,
dirNamesExcludeCurrentDir: false,
dirNamesIncludeFiles: '',
dirNamesIncludeFilesSeparator: '\n',
dirNamesDeletedFilesIncludeOnlyDeletedDirs: false,
json: false,
escapeJson: true,
safeOutput: true,
fetchDepth: 50,
fetchAdditionalSubmoduleHistory: false,
sinceLastRemoteCommit: false,
writeOutputFiles: false,
outputDir: '.github/outputs',
outputRenamedFilesAsDeletedAndAdded: false,
recoverDeletedFiles: false,
recoverDeletedFilesToDestination: '',
recoverFiles: '',
recoverFilesSeparator: '\n',
recoverFilesIgnore: '',
recoverFilesIgnoreSeparator: '\n',
token: '${{ github.token }}',
apiUrl: '${{ github.api_url }}',
skipInitialFetch: false,
failOnInitialDiffError: false,
failOnSubmoduleDiffError: false,
negationPatternsFirst: false,
useRestApi: false
}
const coreWarningSpy = jest.spyOn(core, 'warning')
await warnUnsupportedRESTAPIInputs({
inputs
})
expect(coreWarningSpy).toHaveBeenCalledWith(
'Input "sha" is not supported when using GitHub\'s REST API to get changed files'
)
expect(coreWarningSpy).toHaveBeenCalledTimes(1)
})
})
})

View File

@@ -166,7 +166,7 @@ export const getRenamedFiles = async ({
}))
) {
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) {
if (inputs.fetchAdditionalSubmoduleHistory) {
message = `To fetch additional submodule history for: ${submodulePath} you can increase history depth using 'fetch_depth' input`
}
core.info(message)
@@ -221,7 +221,7 @@ export const getAllDiffFiles = async ({
diffResult,
submodulePaths,
outputRenamedFilesAsDeletedAndAdded,
fetchSubmoduleHistory,
fetchAdditionalSubmoduleHistory,
failOnInitialDiffError,
failOnSubmoduleDiffError
}: {
@@ -230,7 +230,7 @@ export const getAllDiffFiles = async ({
diffResult: DiffResult
submodulePaths: string[]
outputRenamedFilesAsDeletedAndAdded: boolean
fetchSubmoduleHistory: boolean
fetchAdditionalSubmoduleHistory: boolean
failOnInitialDiffError: boolean
failOnSubmoduleDiffError: boolean
}): Promise<ChangedFiles> => {
@@ -270,7 +270,7 @@ export const getAllDiffFiles = async ({
}))
) {
let message = `Set 'fetch_additional_submodule_history: true' to fetch additional submodule history for: ${submodulePath}`
if (fetchSubmoduleHistory) {
if (fetchAdditionalSubmoduleHistory) {
message = `To fetch additional submodule history for: ${submodulePath} you can increase history depth using 'fetch_depth' input`
}
core.warning(message)

View File

@@ -152,7 +152,7 @@ export const getSHAForNonPullRequestEvent = async (
})
}
} else {
if (hasSubmodule && inputs.fetchSubmoduleHistory) {
if (hasSubmodule && inputs.fetchAdditionalSubmoduleHistory) {
await gitFetchSubmodules({
cwd: workingDirectory,
args: [
@@ -382,7 +382,7 @@ export const getSHAForPullRequestEvent = async (
}
}
} else {
if (hasSubmodule && inputs.fetchSubmoduleHistory) {
if (hasSubmodule && inputs.fetchAdditionalSubmoduleHistory) {
await gitFetchSubmodules({
cwd: workingDirectory,
args: [
@@ -429,7 +429,7 @@ export const getSHAForPullRequestEvent = async (
if (
!github.context.payload.pull_request?.base?.ref ||
github.context.payload.head?.repo?.fork === 'true'
github.context.payload.pull_request?.head?.repo?.fork === true
) {
diff = '..'
}

24
src/constant.ts Normal file
View File

@@ -0,0 +1,24 @@
import {Inputs} from './inputs'
export const DEFAULT_VALUES_OF_UNSUPPORTED_API_INPUTS: Partial<Inputs> = {
sha: '',
baseSha: '',
since: '',
until: '',
path: '.',
quotepath: true,
diffRelative: true,
sinceLastRemoteCommit: false,
recoverDeletedFiles: false,
recoverDeletedFilesToDestination: '',
recoverFiles: '',
recoverFilesSeparator: '\n',
recoverFilesIgnore: '',
recoverFilesIgnoreSeparator: '\n',
includeAllOldNewRenamedFiles: false,
oldNewSeparator: ',',
oldNewFilesSeparator: ' ',
skipInitialFetch: false,
fetchAdditionalSubmoduleHistory: false,
dirNamesDeletedFilesIncludeOnlyDeletedDirs: false
}

View File

@@ -5,8 +5,9 @@ export type Env = {
GITHUB_REF: string
GITHUB_WORKSPACE: string
}
export const getEnv = async (): Promise<Env> => {
core.debug(`Process Env: ${JSON.stringify(process.env, null, 2)}`)
core.debug(`Env: ${JSON.stringify(process.env, null, 2)}`)
return {
GITHUB_REF_NAME: process.env.GITHUB_REF_NAME || '',

View File

@@ -24,7 +24,7 @@ export type Inputs = {
since: string
until: string
path: string
quotePath: boolean
quotepath: boolean
diffRelative: boolean
dirNames: boolean
dirNamesMaxDepth?: number
@@ -36,7 +36,7 @@ export type Inputs = {
escapeJson: boolean
safeOutput: boolean
fetchDepth?: number
fetchSubmoduleHistory: boolean
fetchAdditionalSubmoduleHistory: boolean
sinceLastRemoteCommit: boolean
writeOutputFiles: boolean
outputDir: string
@@ -53,6 +53,7 @@ export type Inputs = {
failOnInitialDiffError: boolean
failOnSubmoduleDiffError: boolean
negationPatternsFirst: boolean
useRestApi: boolean
}
export const getInputs = (): Inputs => {
@@ -131,7 +132,7 @@ export const getInputs = (): Inputs => {
const since = core.getInput('since', {required: false})
const until = core.getInput('until', {required: false})
const path = core.getInput('path', {required: false})
const quotePath = core.getBooleanInput('quotepath', {required: false})
const quotepath = core.getBooleanInput('quotepath', {required: false})
const diffRelative = core.getBooleanInput('diff_relative', {required: false})
const dirNames = core.getBooleanInput('dir_names', {required: false})
const dirNamesMaxDepth = core.getInput('dir_names_max_depth', {
@@ -196,7 +197,7 @@ export const getInputs = (): Inputs => {
const skipInitialFetch = core.getBooleanInput('skip_initial_fetch', {
required: false
})
const fetchSubmoduleHistory = core.getBooleanInput(
const fetchAdditionalSubmoduleHistory = core.getBooleanInput(
'fetch_additional_submodule_history',
{
required: false
@@ -228,6 +229,10 @@ export const getInputs = (): Inputs => {
}
)
const useRestApi = core.getBooleanInput('use_rest_api', {
required: false
})
const inputs: Inputs = {
files,
filesSeparator,
@@ -252,7 +257,7 @@ export const getInputs = (): Inputs => {
since,
until,
path,
quotePath,
quotepath,
diffRelative,
sinceLastRemoteCommit,
recoverDeletedFiles,
@@ -265,7 +270,7 @@ export const getInputs = (): Inputs => {
oldNewSeparator,
oldNewFilesSeparator,
skipInitialFetch,
fetchSubmoduleHistory,
fetchAdditionalSubmoduleHistory,
dirNamesDeletedFilesIncludeOnlyDeletedDirs,
// End Not Supported via REST API
dirNames,
@@ -280,7 +285,8 @@ export const getInputs = (): Inputs => {
outputRenamedFilesAsDeletedAndAdded,
token,
apiUrl,
negationPatternsFirst
negationPatternsFirst,
useRestApi
}
if (fetchDepth) {

View File

@@ -26,7 +26,8 @@ import {
setOutput,
submoduleExists,
updateGitGlobalConfig,
verifyMinimumGitVersion
verifyMinimumGitVersion,
warnUnsupportedRESTAPIInputs
} from './utils'
const getChangedFilesFromLocalGitHistory = async ({
@@ -44,15 +45,15 @@ const getChangedFilesFromLocalGitHistory = async ({
}): Promise<void> => {
await verifyMinimumGitVersion()
let quotePathValue = 'on'
let quotepathValue = 'on'
if (!inputs.quotePath) {
quotePathValue = 'off'
if (!inputs.quotepath) {
quotepathValue = 'off'
}
await updateGitGlobalConfig({
name: 'core.quotepath',
value: quotePathValue
value: quotepathValue
})
if (inputs.diffRelative) {
@@ -123,7 +124,7 @@ const getChangedFilesFromLocalGitHistory = async ({
diffResult,
submodulePaths,
outputRenamedFilesAsDeletedAndAdded,
fetchSubmoduleHistory: inputs.fetchSubmoduleHistory,
fetchAdditionalSubmoduleHistory: inputs.fetchAdditionalSubmoduleHistory,
failOnInitialDiffError: inputs.failOnInitialDiffError,
failOnSubmoduleDiffError: inputs.failOnSubmoduleDiffError
})
@@ -224,7 +225,7 @@ export async function run(): Promise<void> {
const workingDirectory = path.resolve(
env.GITHUB_WORKSPACE || process.cwd(),
inputs.path
inputs.useRestApi ? '.' : inputs.path
)
core.debug(`Working directory: ${workingDirectory}`)
@@ -243,35 +244,19 @@ export async function run(): Promise<void> {
})
core.debug(`Yaml file patterns: ${JSON.stringify(yamlFilePatterns)}`)
if (inputs.useRestApi && !github.context.payload.pull_request?.number) {
throw new Error(
"Only pull_request* events are supported when using GitHub's REST API."
)
}
if (
inputs.token &&
github.context.payload.pull_request?.number &&
!hasGitDirectory
(!hasGitDirectory || inputs.useRestApi)
) {
core.info("Using GitHub's REST API to get changed files")
const unsupportedInputs: (keyof Inputs)[] = [
'sha',
'baseSha',
'since',
'until',
'sinceLastRemoteCommit',
'recoverDeletedFiles',
'recoverDeletedFilesToDestination',
'recoverFiles',
'recoverFilesIgnore',
'includeAllOldNewRenamedFiles',
'skipInitialFetch',
'fetchSubmoduleHistory',
'dirNamesDeletedFilesIncludeOnlyDeletedDirs'
]
for (const input of unsupportedInputs) {
if (inputs[input]) {
core.warning(
`Input "${input}" is not supported when using GitHub's REST API to get changed files`
)
}
}
await warnUnsupportedRESTAPIInputs({inputs})
await getChangedFilesFromRESTAPI({
inputs,
filePatterns,
@@ -279,10 +264,9 @@ export async function run(): Promise<void> {
})
} else {
if (!hasGitDirectory) {
core.setFailed(
"Can't find local .git directory. Please run actions/checkout before this action"
throw new Error(
`Unable to locate the git repository in the given path: ${workingDirectory}.\n Please run actions/checkout before this action (Make sure the 'path' input is correct).\n If you intend to use Github's REST API note that only pull_request* events are supported. Current event is "${github.context.eventName}".`
)
return
}
core.info('Using local .git directory')
@@ -301,5 +285,6 @@ if (!process.env.TESTING) {
// eslint-disable-next-line github/no-then
run().catch(e => {
core.setFailed(e.message || e)
process.exit(1)
})
}

View File

@@ -3,14 +3,14 @@ import * as core from '@actions/core'
import * as exec from '@actions/exec'
import * as github from '@actions/github'
import {createReadStream, promises as fs} from 'fs'
import {readFile} from 'fs/promises'
import {flattenDeep} from 'lodash'
import {flattenDeep, snakeCase} from 'lodash'
import mm from 'micromatch'
import * as path from 'path'
import {createInterface} from 'readline'
import {parseDocument} from 'yaml'
import {ChangedFiles, ChangeTypeEnum} from './changedFiles'
import {DiffResult} from './commitSha'
import {DEFAULT_VALUES_OF_UNSUPPORTED_API_INPUTS} from './constant'
import {Inputs} from './inputs'
const MINIMUM_GIT_VERSION = '2.18.0'
@@ -171,15 +171,16 @@ async function* lineOfFileGenerator({
input: fileStream,
crlfDelay: Infinity
})
for await (const line of rl) {
for await (let line of rl) {
if (!line.startsWith('#') && line !== '') {
if (excludedFiles) {
if (line.startsWith('!')) {
yield line
} else {
yield `!${line}`
line = line.startsWith('!') ? line : `!${line}`
if (line.endsWith(path.sep)) {
line = `${line}**`
}
yield line
} else {
line = line.endsWith(path.sep) ? `${line}**` : line
yield line
}
}
@@ -285,6 +286,7 @@ export const submoduleExists = async ({
* Fetches the git repository
* @param args - arguments for fetch command
* @param cwd - working directory
* @returns exit code
*/
export const gitFetch = async ({
args,
@@ -333,6 +335,7 @@ export const gitFetchSubmodules = async ({
/**
* Retrieves all the submodule paths
* @param cwd - working directory
* @returns submodule paths
*/
export const getSubmodulePath = async ({
cwd
@@ -367,6 +370,7 @@ export const getSubmodulePath = async ({
* @param parentSha2 - parent commit sha
* @param submodulePath - path of submodule
* @param diff - diff type between parent commits (`..` or `...`)
* @returns commit sha of submodule
*/
export const gitSubmoduleDiffSHA = async ({
cwd,
@@ -676,6 +680,12 @@ export const isInsideWorkTree = async ({
}
)
if (stdout.trim() !== 'true') {
core.debug(
`The current working directory is not inside a git repository: ${cwd}`
)
}
return stdout.trim() === 'true'
}
@@ -898,7 +908,7 @@ export const canDiffCommits = async ({
} else {
const {exitCode, stderr} = await exec.getExecOutput(
'git',
['diff', '--quiet', sha1, sha2],
['diff', '--no-patch', sha1, sha2],
{
cwd,
ignoreReturnCode: true,
@@ -995,6 +1005,7 @@ export const getFilePatterns = async ({
if (inputs.files) {
const filesPatterns = inputs.files
.split(inputs.filesSeparator)
.map(p => (p.endsWith(path.sep) ? `${p}**` : p))
.filter(Boolean)
cleanedFilePatterns.push(...filesPatterns)
@@ -1026,8 +1037,9 @@ export const getFilePatterns = async ({
.split(inputs.filesIgnoreSeparator)
.filter(Boolean)
.map(p => {
if (!p.startsWith('!')) {
p = `!${p}`
p = p.startsWith('!') ? p : `!${p}`
if (p.endsWith(path.sep)) {
p = `${p}**`
}
return p
})
@@ -1128,7 +1140,7 @@ const getYamlFilePatternsFromContents = async ({
throw new Error(`File does not exist: ${filePath}`)
}
source = await readFile(filePath, 'utf8')
source = await fs.readFile(filePath, 'utf8')
} else {
source = content
}
@@ -1355,10 +1367,7 @@ export const setOutput = async ({
// if safeOutput is true, escape special characters for bash shell
if (safeOutput) {
cleanedValue = cleanedValue.replace(
/[^\x20-\x7E]|[:*?"<>|;`$()&!]/g,
'\\$&'
)
cleanedValue = cleanedValue.replace(/[^\x20-\x7E]|[:*?<>|;`$()&!]/g, '\\$&')
}
core.setOutput(key, cleanedValue)
@@ -1494,6 +1503,12 @@ export const recoverDeletedFiles = async ({
}
}
/**
* Determines whether the specified working directory has a local Git directory.
*
* @param workingDirectory - The path of the working directory.
* @returns A boolean value indicating whether the working directory has a local Git directory.
*/
export const hasLocalGitDirectory = async ({
workingDirectory
}: {
@@ -1503,3 +1518,33 @@ export const hasLocalGitDirectory = async ({
cwd: workingDirectory
})
}
/**
* Warns about unsupported inputs when using the REST API.
*
* @param inputs - The inputs object.
*/
export const warnUnsupportedRESTAPIInputs = async ({
inputs
}: {
inputs: Inputs
}): Promise<void> => {
for (const key of Object.keys(DEFAULT_VALUES_OF_UNSUPPORTED_API_INPUTS)) {
const defaultValue = Object.hasOwnProperty.call(
DEFAULT_VALUES_OF_UNSUPPORTED_API_INPUTS,
key
)
? DEFAULT_VALUES_OF_UNSUPPORTED_API_INPUTS[
key as keyof Inputs
]?.toString()
: ''
if (defaultValue !== inputs[key as keyof Inputs]?.toString()) {
core.warning(
`Input "${snakeCase(
key
)}" is not supported when using GitHub's REST API to get changed files`
)
}
}
}

1014
yarn.lock

File diff suppressed because it is too large Load Diff