Compare commits

...

337 Commits

Author SHA1 Message Date
tj-actions[bot]
77af4bed28 Updated README.md (#1989)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2024-03-13 22:28:45 +00:00
Tonye Jack
a5cf6aa30c feat: add support for returning true for any_{changed, modified, deleted} outputs when no patterns are specified (#1988)
Co-authored-by: GitHub Action <action@github.com>
2024-03-13 22:19:50 +00:00
renovate[bot]
15807c9c84 chore(deps): update dependency @types/node to v20.11.27 2024-03-13 16:39:47 +00:00
renovate[bot]
dc458cf753 chore(deps): update peter-evans/create-pull-request action to v6.0.2 2024-03-12 16:01:39 +00:00
renovate[bot]
92ca3eebd0 chore(deps): update dependency @types/lodash to v4.17.0 2024-03-12 11:21:16 +00:00
renovate[bot]
f591d0c7f0 chore(deps): update dependency @typescript-eslint/eslint-plugin to v7.2.0 2024-03-11 23:32:55 +00:00
renovate[bot]
35023362e2 chore(deps): update dependency @types/node to v20.11.26 2024-03-11 23:20:54 +00:00
renovate[bot]
e436cb6d85 chore(deps): update dependency @typescript-eslint/parser to v7.2.0 2024-03-11 18:12:31 +00:00
renovate[bot]
257d47dfba chore(deps): lock file maintenance 2024-03-11 01:16:09 +00:00
tj-actions[bot]
4918e11830 Upgraded to v42.1.0 (#1977)
Co-authored-by: jackton1 <17484350+jackton1@users.noreply.github.com>
2024-03-09 20:14:28 +00:00
tj-actions[bot]
aa08304bd4 Updated README.md (#1976)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2024-03-09 01:29:44 +00:00
Tonye Jack
008ba8ceec feat: add matrix alias to simplify using outputs for matrix jobs (#1975)
Co-authored-by: GitHub Action <action@github.com>
2024-03-09 01:20:45 +00:00
tj-actions[bot]
fe6c3ea0ca Upgraded to v42.0.7 (#1974)
Co-authored-by: jackton1 <17484350+jackton1@users.noreply.github.com>
2024-03-07 22:21:22 +00:00
GitHub Action
7fc073d922 Added missing changes and modified dist assets. 2024-03-07 22:11:09 +00:00
renovate[bot]
7e4bfc2f1f chore(deps): lock file maintenance 2024-03-07 22:11:09 +00:00
Tonye Jack
ef3a7f51d6 chore: add test for detecting changed-files in a nested directory (#1972) 2024-03-07 21:34:48 +00:00
Tonye Jack
a65c2f2100 Update README.md 2024-03-06 21:25:13 -07:00
GitHub Action
ea042d8095 Added missing changes and modified dist assets. 2024-03-06 18:49:07 +00:00
renovate[bot]
8293f8c984 chore(deps): update dependency typescript to v5.4.2 2024-03-06 18:49:07 +00:00
renovate[bot]
0ff732eeb3 chore(deps): update dependency @types/node to v20.11.25 2024-03-06 18:39:17 +00:00
tj-actions[bot]
8df6fc260f Upgraded to v42.0.6 (#1968)
Co-authored-by: jackton1 <17484350+jackton1@users.noreply.github.com>
2024-03-06 16:42:51 +00:00
GitHub Action
d516645658 Added missing changes and modified dist assets. 2024-03-06 12:50:33 +00:00
renovate[bot]
2c97e7ea24 fix(deps): update dependency yaml to v2.4.1 2024-03-06 12:50:33 +00:00
renovate[bot]
1c8e606958 chore(deps): update typescript-eslint monorepo to v7.1.1 2024-03-04 18:15:53 +00:00
GitHub Action
74605cb326 Added missing changes and modified dist assets. 2024-03-04 00:18:25 +00:00
renovate[bot]
aa15b58e8a chore(deps): lock file maintenance 2024-03-04 00:18:25 +00:00
renovate[bot]
0a392e7438 chore(deps): update dependency eslint-plugin-github to v4.10.2 2024-02-29 23:36:05 +00:00
renovate[bot]
85efc7df8e chore(deps): update dependency @types/node to v20.11.24 2024-02-29 18:22:25 +00:00
renovate[bot]
2a095d24c2 chore(deps): update dependency @types/node to v20.11.23 2024-02-29 12:45:48 +00:00
renovate[bot]
ac3dc5e392 chore(deps): update tj-actions/verify-changed-files action to v19 (#1960)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-29 01:16:44 +00:00
renovate[bot]
dd7e9d3b17 chore(deps): update dependency @types/node to v20.11.22 2024-02-28 20:16:24 +00:00
renovate[bot]
0647a31f54 chore(deps): update peter-evans/create-pull-request action to v6.0.1 2024-02-28 04:49:44 +00:00
renovate[bot]
9d67dd3dbe chore(deps): update dependency @types/node to v20.11.21 2024-02-28 00:41:14 +00:00
renovate[bot]
5acd7e3646 chore(deps): update typescript-eslint monorepo to v7.1.0 2024-02-26 20:18:46 +00:00
tj-actions[bot]
9f4af73d05 Upgraded to v42.0.5 (#1955)
Co-authored-by: jackton1 <17484350+jackton1@users.noreply.github.com>
2024-02-26 07:25:53 +00:00
renovate[bot]
800a282599 chore(deps): lock file maintenance 2024-02-26 02:02:02 +00:00
GitHub Action
31c4d150e6 Added missing changes and modified dist assets. 2024-02-25 16:58:14 +00:00
renovate[bot]
2a2a5b6b9c fix(deps): update dependency yaml to v2.4.0 2024-02-25 16:58:14 +00:00
Tonye Jack
d8dcc13244 chore: Update README.md (#1952) 2024-02-25 16:48:32 +00:00
renovate[bot]
639ce0e105 chore(deps): update dependency eslint to v8.57.0 2024-02-23 22:38:47 +00:00
GitHub Action
9d447b9959 Added missing changes and modified dist assets. 2024-02-23 04:24:39 +00:00
renovate[bot]
83bfc72efa chore(deps): lock file maintenance 2024-02-23 04:24:39 +00:00
renovate[bot]
879c8388c8 chore(deps): update dependency @types/node to v20.11.20 2024-02-22 19:58:37 +00:00
Tonye Jack
bb7502bd15 Update README.md 2024-02-21 07:20:22 -07:00
renovate[bot]
5c5539ced9 chore(deps): update typescript-eslint monorepo to v7.0.2 2024-02-19 19:54:17 +00:00
GitHub Action
c2039de114 Added missing changes and modified dist assets. 2024-02-19 00:16:07 +00:00
renovate[bot]
0cbc9bc448 chore(deps): lock file maintenance 2024-02-19 00:16:07 +00:00
tj-actions[bot]
9ef20a69dd Updated README.md (#1943)
Co-authored-by: jackton1 <17484350+jackton1@users.noreply.github.com>
2024-02-18 05:12:36 +00:00
Tonye Jack
a617853c0f chore: update action.yml (#1942) 2024-02-17 21:58:39 -07:00
tj-actions[bot]
5c1bceb76c Upgraded to v42.0.4 (#1941)
Co-authored-by: jackton1 <17484350+jackton1@users.noreply.github.com>
2024-02-18 03:31:45 +00:00
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
Tonye Jack
6e79d6e3db Update README.md 2023-12-23 04:59:15 -07:00
Tonye Jack
d13ac1942f Update README.md 2023-12-23 04:52:19 -07:00
Tonye Jack
bb89f97963 Update README.md 2023-12-23 04:50:22 -07:00
tj-actions[bot]
1864078d0a Updated README.md (#1810)
Co-authored-by: renovate[bot] <renovate[bot]@users.noreply.github.com>
2023-12-23 04:39:57 -07:00
renovate[bot]
f495a0321d chore(deps): lock file maintenance 2023-12-23 11:32:29 +00:00
Tonye Jack
47371c50e9 Update README.md (#1808) 2023-12-23 04:15:05 -07:00
Tonye Jack
4f573fed06 Revert "chore(deps): update actions/download-artifact action to v4" (#1806) 2023-12-23 04:11:47 -07:00
tj-actions[bot]
ff2f6e6b91 fix: update safe output regex and the docs (#1805)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: Tonye Jack <jtonye@ymail.com>
2023-12-23 03:56:31 -07:00
Jorge
0102c07446 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 `|&;`
2023-12-22 14:07:32 -07:00
renovate[bot]
089842a7a8 chore(deps): update dependency eslint-plugin-prettier to v5.1.1 2023-12-21 17:04:14 +00:00
renovate[bot]
787db0612e chore(deps): lock file maintenance 2023-12-20 06:15:16 +00:00
renovate[bot]
4ef6b56482 chore(deps): update dependency eslint-plugin-prettier to v5.1.0 2023-12-19 21:38:20 +00:00
tj-actions[bot]
f9480db177 Upgraded to v40.2.3 (#1800)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2023-12-18 20:13:17 +00:00
renovate[bot]
c9ae347dbb chore(deps): update typescript-eslint monorepo to v6.15.0 2023-12-18 19:31:19 +00:00
renovate[bot]
56284d8081 chore(deps): update actions/setup-node action to v4.0.1 2023-12-18 13:24:36 +00:00
renovate[bot]
35ad6787f5 chore(deps): lock file maintenance 2023-12-18 01:38:30 +00:00
renovate[bot]
ca0db0ea03 chore(deps): update dependency @types/node to v20.10.5 2023-12-18 01:37:56 +00:00
renovate[bot]
03fcd0b3bb chore(deps): update dependency eslint to v8.56.0 2023-12-16 01:15:44 +00:00
Tonye Jack
35da2a2e01 Update README.md 2023-12-14 14:57:20 -07:00
renovate[bot]
2329d9fb48 chore(deps): lock file maintenance 2023-12-14 20:17:28 +00:00
renovate[bot]
154ca89d2e chore(deps): update actions/download-artifact action to v4 (#1793)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Tonye Jack <jtonye@ymail.com>
2023-12-14 13:00:10 -07:00
renovate[bot]
449352f10e chore(deps): update github/codeql-action action to v3 (#1792)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-13 17:06:49 +00:00
renovate[bot]
7c1826332f chore(deps): update typescript-eslint monorepo to v6.14.0 2023-12-11 18:39:28 +00:00
GitHub Action
af2816c654 Added missing changes and modified dist assets. 2023-12-10 19:45:40 +00:00
renovate[bot]
88be287f56 chore(deps): lock file maintenance 2023-12-10 19:45:40 +00:00
renovate[bot]
5513a5e205 chore(deps): update dependency prettier to v3.1.1 2023-12-10 11:22:16 +00:00
Tonye Jack
e7023fa1da Update README.md 2023-12-10 00:28:33 -07:00
tj-actions[bot]
46550b6fd9 Upgraded to v40.2.2 (#1787)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2023-12-10 07:24:06 +00:00
Tonye Jack
9454999946 fix: bug recovering deleted files for submodules (#1784)
Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2023-12-10 07:14:44 +00:00
tj-actions[bot]
7611ff348d Updated README.md (#1786)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2023-12-09 23:59:37 -07:00
allcontributors[bot]
187cf1e88c docs: add rodrigorfk as a contributor for code, test, and bug (#1785)
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2023-12-09 23:55:41 -07:00
dependabot[bot]
e1e532cff0 chore(deps): bump tj-actions/branch-names from 7 to 8 (#1782)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-08 01:50:07 +00:00
renovate[bot]
dfecec4fb7 chore(deps): update dependency @types/node to v20.10.4 2023-12-07 10:15:47 +00:00
Tonye Jack
c116f52a15 Update README.md 2023-12-06 21:44:31 -07:00
tj-actions[bot]
0b0b6429e1 Updated README.md (#1779)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2023-12-07 04:22:32 +00:00
Tonye Jack
f732c371a4 Update README.md 2023-12-06 21:14:34 -07:00
tj-actions[bot]
04c00459a2 Updated README.md (#1778)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2023-12-07 03:56:05 +00:00
Tonye Jack
5cee511ba5 Update README.md 2023-12-06 20:39:16 -07:00
Tonye Jack
399525a994 Update README.md 2023-12-06 20:37:51 -07:00
Tonye Jack
c075bd2719 Update README.md 2023-12-06 20:37:03 -07:00
renovate[bot]
208b83f295 chore(deps): update dependency typescript to v5.3.3 2023-12-06 21:22:39 +00:00
dependabot[bot]
ccb109a584 chore(deps-dev): bump @types/jest from 29.5.10 to 29.5.11 (#1775)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-06 02:00:42 +00:00
Tonye Jack
2918913341 Update README.md 2023-12-05 12:58:01 -07:00
Tonye Jack
a66176714d Deleted .github/workflows/auto-approve.yml 2023-12-04 21:09:51 -07:00
Tonye Jack
95642a1ebb chore: Update package.json (#1774) 2023-12-05 04:09:37 +00:00
Tonye Jack
726e06f8ef chore: Create SECURITY.md (#1773) 2023-12-04 20:52:31 -07:00
renovate[bot]
d96fe5d997 chore(deps): update typescript-eslint monorepo to v6.13.2 2023-12-04 19:47:16 +00:00
tj-actions[bot]
4ae611e5c5 Upgraded to v40.2.1 (#1771)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2023-12-04 03:46:41 +00:00
GitHub Action
1c938490c8 Added missing changes and modified dist assets. 2023-12-03 20:29:21 -07:00
renovate[bot]
ba558db977 chore(deps): lock file maintenance 2023-12-03 20:29:21 -07:00
renovate[bot]
bf19fa23a6 chore(deps): update dependency @types/node to v20.10.3 2023-12-03 21:37:55 +00:00
tj-actions[bot]
66b77cbd0c Updated README.md (#1769)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2023-12-03 14:16:56 -07:00
Tonye Jack
10bfa980b7 Update README.md 2023-12-03 14:15:28 -07:00
tj-actions[bot]
9e46b4f7f7 Updated README.md (#1767)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
Co-authored-by: Tonye Jack <jtonye@ymail.com>
2023-12-03 14:14:48 -07:00
Tonye Jack
3bf6172534 Update README.md 2023-12-03 12:46:59 -07:00
renovate[bot]
45581f0044 chore(deps): update dependency eslint-config-prettier to v9.1.0 2023-12-02 14:24:35 +00:00
renovate[bot]
9ebb48b57a chore(deps): update dependency eslint to v8.55.0 2023-12-02 01:04:38 +00:00
renovate[bot]
4e2dca3ba5 chore(deps): update dependency @types/node to v20.10.2 2023-12-01 21:10:58 +00:00
Tonye Jack
af6bdde59a security: Update test.yml removing pull_request_review event (#1763) 2023-11-29 22:28:34 -07:00
Tonye Jack
fc1fb2b582 test: verify bug writing outputs when files_yaml is used (#1762) 2023-11-29 17:03:50 -07:00
renovate[bot]
883b4ccbdb chore(deps): update dependency @types/node to v20.10.1 2023-11-29 20:45:42 +00:00
Tonye Jack
f91c9fe8b1 Deleted .github/workflows/greetings.yml 2023-11-29 09:01:35 -07:00
Tonye Jack
3ca6b80013 security: remove usage of pull_request_target event from test.yml (#1758) 2023-11-29 04:22:26 +00:00
GitHub Action
ee5ef758aa Added missing changes and modified dist assets. 2023-11-28 23:43:36 +00:00
renovate[bot]
42fe158594 chore(deps): lock file maintenance 2023-11-28 23:43:36 +00:00
tj-actions[bot]
48427afe26 Updated README.md (#1755)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2023-11-28 18:23:42 +00:00
Tonye Jack
5c74583cb3 chore: remove unused job (#1754) 2023-11-28 11:01:22 -07:00
Tonye Jack
742ed362b6 Update README.md 2023-11-28 09:58:20 -07:00
renovate[bot]
44d340e48c chore(deps): update typescript-eslint monorepo to v6.13.1 2023-11-28 10:36:38 +00:00
renovate[bot]
2561448da0 chore(deps): update typescript-eslint monorepo to v6.13.0 2023-11-27 18:14:41 +00:00
tj-actions[bot]
86cabf5ea2 Updated README.md (#1750)
Co-authored-by: repo-ranger[bot] <repo-ranger[bot]@users.noreply.github.com>
2023-11-27 17:57:48 +00:00
Tonye Jack
b5fc67a4f5 chore: update README.md (#1749) 2023-11-27 17:39:44 +00:00
tj-actions[bot]
0b22a52bff Upgraded to v40.2.0 (#1746)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2023-11-27 09:19:57 +00:00
Tonye Jack
da093c1609 fix: prevent similar commit hashes error when using the branch name (#1745)
Co-authored-by: GitHub Action <action@github.com>
2023-11-27 08:36:29 +00:00
Tonye Jack
c634be959b fix: prevent similar commit hashes error when using the branch name (#1744)
Co-authored-by: GitHub Action <action@github.com>
2023-11-27 07:54:44 +00:00
Tonye Jack
2139fa1b6f feat: add support for passing branch name to the base_sha and sha inputs (#1742) 2023-11-27 07:11:43 +00:00
Tonye Jack
6784c9e1ee Update README.md 2023-11-26 18:51:22 -07:00
GitHub Action
607d5ddbbf Added missing changes and modified dist assets. 2023-11-27 00:31:36 +00:00
renovate[bot]
d588360bfe chore(deps): lock file maintenance 2023-11-27 00:31:36 +00:00
Tonye Jack
90f2c0c1b1 Update greetings.yml 2023-11-26 00:11:12 -07:00
renovate[bot]
0d6e9b7196 chore(deps): update dependency @types/node to v20.10.0 2023-11-24 10:34:08 +00:00
renovate[bot]
8f90cc165a chore(deps): update dependency @types/node to v20.9.5 2023-11-24 00:53:37 +00:00
renovate[bot]
75758bc65f chore(deps): update dependency @types/jest to v29.5.10 2023-11-22 02:04:07 +00:00
dependabot[bot]
066e72a5fb Bump @types/node from 20.9.3 to 20.9.4 (#1732)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-22 01:46:19 +00:00
dependabot[bot]
c23e564e67 Bump @types/jest from 29.5.8 to 29.5.9 (#1726)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2023-11-21 11:41:03 -07:00
dependabot[bot]
c0080255e3 Bump @types/micromatch from 4.0.5 to 4.0.6 (#1727)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2023-11-21 11:36:41 -07:00
dependabot[bot]
3a3d3a2b86 Bump @types/lodash from 4.14.201 to 4.14.202 (#1728)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2023-11-21 07:05:39 -07:00
renovate[bot]
79ef9d3fee chore(deps): update dependency @types/lodash to v4.14.202 2023-11-21 04:02:59 +00:00
renovate[bot]
da4597ee22 chore(deps): update dependency @types/micromatch to v4.0.6 2023-11-21 03:41:54 +00:00
renovate[bot]
9f4ec1c14f chore(deps): update dependency @types/jest to v29.5.9 2023-11-21 03:21:14 +00:00
dependabot[bot]
4da6e32cfe Bump @types/node from 20.9.2 to 20.9.3 (#1725)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-21 02:31:14 +00:00
GitHub Action
7f1c4cb6db Added missing changes and modified dist assets. 2023-11-20 20:48:07 +00:00
renovate[bot]
939fbca781 chore(deps): update dependency typescript to v5.3.2 2023-11-20 20:48:07 +00:00
renovate[bot]
9ba175ae24 chore(deps): update typescript-eslint monorepo to v6.12.0 2023-11-20 17:41:59 +00:00
tj-actions[bot]
f7779a6302 Updated README.md (#1722)
Co-authored-by: repo-ranger[bot] <repo-ranger[bot]@users.noreply.github.com>
2023-11-20 03:15:32 +00:00
Tonye Jack
05bdc91228 chore: simplify matrix example workflow (#1719)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2023-11-20 03:05:34 +00:00
tj-actions[bot]
6d07b6ee59 Updated README.md (#1721)
Co-authored-by: renovate[bot] <renovate[bot]@users.noreply.github.com>
2023-11-20 02:16:46 +00:00
GitHub Action
1cf54bb5d3 Added missing changes and modified dist assets. 2023-11-20 02:06:41 +00:00
renovate[bot]
21b4a4bc7b chore(deps): lock file maintenance 2023-11-20 02:06:41 +00:00
renovate[bot]
658f397297 chore(deps): update dependency @types/node to v20.9.2 2023-11-18 23:22:56 +00:00
renovate[bot]
38a0c329bb chore(deps): update dependency eslint to v8.54.0 2023-11-17 22:45:21 +00:00
renovate[bot]
b0be21b8df chore(deps): update dependency @types/node to v20.9.1 2023-11-16 23:06:36 +00:00
tj-actions[bot]
97825a1994 Updated README.md (#1714)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2023-11-16 15:14:50 +00:00
Tonye Jack
13189f9e52 chore: update action.yml 2023-11-16 08:02:45 -07:00
tj-actions[bot]
2a9f067522 Updated README.md (#1713)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2023-11-15 19:50:40 +00:00
Tonye Jack
ad01f6fdba chore: update action inputs description 2023-11-15 12:41:33 -07:00
tj-actions[bot]
b082611680 Updated README.md (#1712)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2023-11-15 16:07:40 +00:00
Tonye Jack
a36c479373 chore: update input description 2023-11-15 08:55:35 -07:00
tj-actions[bot]
90a4f2a326 Updated README.md (#1711)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2023-11-15 15:49:57 +00:00
Tonye Jack
41ff1f2249 chore: update input description 2023-11-15 08:38:50 -07:00
tj-actions[bot]
b20ce84763 Updated README.md (#1710)
Co-authored-by: repo-ranger[bot] <repo-ranger[bot]@users.noreply.github.com>
2023-11-15 05:46:02 +00:00
Tonye Jack
875213d4a9 chore: Update update-readme.yml (#1709) 2023-11-15 05:33:58 +00:00
renovate[bot]
71b57652f0 chore(deps): update typescript-eslint monorepo to v6.11.0 2023-11-13 17:52:21 +00:00
renovate[bot]
834b86247e chore(deps): update dependency prettier to v3.1.0 2023-11-13 04:30:36 +00:00
GitHub Action
d8d3669cb3 Added missing changes and modified dist assets. 2023-11-13 00:39:11 +00:00
renovate[bot]
940b170a31 chore(deps): lock file maintenance 2023-11-13 00:39:11 +00:00
tj-actions[bot]
55b93d0734 Upgraded to v40.1.1 (#1704)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2023-11-08 03:46:18 +00:00
renovate[bot]
25ef3926d1 chore(deps): update dependency @types/node to v20.9.0 2023-11-08 00:43:20 +00:00
renovate[bot]
4d33bd5f9c chore(deps): update dependency @types/lodash to v4.14.201 2023-11-07 23:16:36 +00:00
renovate[bot]
f25e47258b chore(deps): update dependency @types/micromatch to v4.0.5 2023-11-07 23:03:38 +00:00
renovate[bot]
a3c4ccbde0 chore(deps): update dependency @types/uuid to v9.0.7 2023-11-07 22:37:06 +00:00
renovate[bot]
b114534101 chore(deps): update dependency @types/jest to v29.5.8 2023-11-07 21:40:54 +00:00
renovate[bot]
303f064ba9 chore(deps): update typescript-eslint monorepo to v6.10.0 2023-11-06 20:04:14 +00:00
GitHub Action
e981e53b7f Added missing changes and modified dist assets. 2023-11-06 00:44:12 +00:00
renovate[bot]
d850ef91f7 chore(deps): lock file maintenance 2023-11-06 00:44:12 +00:00
renovate[bot]
8701b586f3 chore(deps): update dependency eslint to v8.53.0 2023-11-04 01:22:05 +00:00
tj-actions[bot]
9b1ba9a603 Upgraded to v40.1.0 (#1695)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2023-11-03 21:08:31 +00:00
tj-actions[bot]
18c8a4eceb Updated README.md (#1694)
Co-authored-by: repo-ranger[bot] <repo-ranger[bot]@users.noreply.github.com>
2023-11-03 20:30:38 +00:00
Tonye Jack
892553a457 feat: add support for controlling the pattern order (#1693)
Co-authored-by: GitHub Action <action@github.com>
2023-11-03 20:19:40 +00:00
GitHub Action
50a9cc9b7b Added missing changes and modified dist assets. 2023-11-03 04:57:00 +00:00
renovate[bot]
c300d15dae fix(deps): update dependency yaml to v2.3.4 2023-11-03 04:57:00 +00:00
tj-actions[bot]
c076064636 Upgraded to v40.0.2 (#1689)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2023-10-31 18:56:37 +00:00
Tonye Jack
40526807ee fix: order of file patterns (#1688)
Co-authored-by: GitHub Action <action@github.com>
2023-10-31 18:39:35 +00:00
renovate[bot]
a59bf8ffcf chore(deps): update dependency @types/node to v20.8.10 2023-10-31 12:31:02 +00:00
tj-actions[bot]
6821899764 Upgraded to v40.0.1 (#1686)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2023-10-31 00:37:06 +00:00
renovate[bot]
bfc49f4cff chore(deps): update dependency @types/jest to v29.5.7 2023-10-30 22:36:16 +00:00
Tonye Jack
7549e1e4b9 fix: bug with order in which the files and files ignore patterns are combined (#1684)
Co-authored-by: GitHub Action <action@github.com>
2023-10-30 22:18:54 +00:00
renovate[bot]
2fc653d87d chore(deps): update dependency @typescript-eslint/eslint-plugin to v6.9.1 2023-10-30 20:51:25 +00:00
renovate[bot]
273a7c1641 chore(deps): update dependency @typescript-eslint/parser to v6.9.1 2023-10-30 17:47:17 +00:00
GitHub Action
905fcf74f4 Added missing changes and modified dist assets. 2023-10-30 01:41:37 +00:00
renovate[bot]
229fe310d2 chore(deps): lock file maintenance 2023-10-30 01:41:37 +00:00
Tonye Jack
85073ea010 Update README.md 2023-10-28 22:42:46 -06:00
Tonye Jack
e622bd9227 Update README.md 2023-10-28 09:35:56 -06:00
Tonye Jack
003b42ec7f Update README.md 2023-10-28 09:34:36 -06:00
Tonye Jack
0a5a862874 Update README.md 2023-10-27 11:24:18 -06:00
tj-actions[bot]
1864dc5311 Updated README.md (#1678)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2023-10-27 07:13:13 +00:00
Tonye Jack
1be6574035 Update action.yml 2023-10-27 01:01:11 -06:00
tj-actions[bot]
51bc7ab145 Updated README.md (#1677)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2023-10-27 04:50:16 +00:00
Tonye Jack
b49b468c28 Update README.md 2023-10-26 22:36:00 -06:00
Tonye Jack
8055b31e95 Update README.md 2023-10-26 22:34:26 -06:00
renovate[bot]
c371c6f055 chore(deps): update dependency eslint-plugin-jest to v27.6.0 2023-10-26 22:10:59 +00:00
renovate[bot]
7448ec4f69 chore(deps): update dependency eslint-plugin-jest to v27.5.0 2023-10-26 21:01:49 +00:00
tj-actions[bot]
d1f3041043 Updated README.md (#1675)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2023-10-26 14:45:16 -06:00
Tonye Jack
d0064d8549 Update README.md 2023-10-26 14:44:18 -06:00
Tonye Jack
4270b9fd4b Update README.md 2023-10-26 14:35:10 -06:00
tj-actions[bot]
cd07d32e58 Updated README.md (#1673)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2023-10-26 12:39:20 +00:00
Tonye Jack
33ddc07d8b Update action.yml 2023-10-26 06:28:05 -06:00
tj-actions[bot]
1c7fbaba14 Upgraded to v40 (#1672)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2023-10-26 04:24:35 +00:00
35 changed files with 6772 additions and 3472 deletions

View File

@@ -197,6 +197,54 @@
"bug",
"code"
]
},
{
"login": "rodrigorfk",
"name": "Rodrigo Fior Kuntzer",
"avatar_url": "https://avatars.githubusercontent.com/u/1995033?v=4",
"profile": "https://github.com/rodrigorfk",
"contributions": [
"code",
"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

@@ -1,33 +0,0 @@
name: Auto approve
on:
pull_request_target
jobs:
auto-approve:
runs-on: ubuntu-latest
steps:
- uses: hmarr/auto-approve-action@v3
if: |
(
github.event.pull_request.user.login == 'dependabot[bot]' ||
github.event.pull_request.user.login == 'dependabot' ||
github.event.pull_request.user.login == 'dependabot-preview[bot]' ||
github.event.pull_request.user.login == 'dependabot-preview' ||
github.event.pull_request.user.login == 'renovate[bot]' ||
github.event.pull_request.user.login == 'renovate' ||
github.event.pull_request.user.login == 'github-actions[bot]'
)
&&
(
github.actor == 'dependabot[bot]' ||
github.actor == 'dependabot' ||
github.actor == 'dependabot-preview[bot]' ||
github.actor == 'dependabot-preview' ||
github.actor == 'renovate[bot]' ||
github.actor == 'renovate' ||
github.actor == 'github-actions[bot]'
)
with:
github-token: ${{ secrets.PAT_TOKEN }}

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
@@ -51,6 +51,6 @@ jobs:
# Upload the SARIF file generated in the previous step
- name: Upload SARIF results file
continue-on-error: true
uses: github/codeql-action/upload-sarif@v2
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: results.sarif

View File

@@ -20,6 +20,11 @@ on:
schedule:
- cron: '44 20 * * 0'
permissions:
actions: read
contents: read
security-events: write
jobs:
analyze:
name: Analyze
@@ -42,7 +47,7 @@ jobs:
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -56,7 +61,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3
# Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
@@ -69,6 +74,6 @@ jobs:
# ./location_of_script_within_repo/buildscript.sh
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"

View File

@@ -2,12 +2,17 @@ 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.GITHUB_TOKEN }}
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:
@@ -8,10 +11,10 @@ on:
jobs:
changed-files:
name: Get changes
name: Get changed files
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
matrix: ${{ steps.changed-files.outputs.all_changed_files }}
steps:
- name: Checkout
uses: actions/checkout@v4
@@ -21,19 +24,17 @@ jobs:
id: changed-files
uses: ./
with:
json: true
quotepath: false
matrix: true
- name: List all changed files
run: echo '${{ steps.changed-files.outputs.all_changed_files }}'
- id: set-matrix
run: echo "matrix={\"files\":${{ steps.changed-files.outputs.all_changed_files }}}" >> "$GITHUB_OUTPUT"
matrix-job:
name: Run Matrix Job
runs-on: ubuntu-latest
needs: [changed-files]
strategy:
matrix: ${{ fromJSON(needs.changed-files.outputs.matrix) }}
matrix:
files: ${{ fromJSON(needs.changed-files.outputs.matrix) }}
max-parallel: 4
fail-fast: false
steps:

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.2
with:
base: "main"
labels: "merge when passing"

View File

@@ -1,12 +1,12 @@
name: CI
permissions:
contents: read
on:
push:
branches:
- "**"
pull_request_review:
types: [edited, dismissed, submitted]
pull_request_target:
pull_request:
types:
- assigned
@@ -27,24 +27,16 @@ on:
- auto_merge_enabled
- auto_merge_disabled
branches:
- main
- "**"
jobs:
shellcheck:
name: Run shellcheck
runs-on: ubuntu-latest
steps:
- name: Checkout branch
uses: actions/checkout@v4
- name: shellcheck
uses: reviewdog/action-shellcheck@v1.19
build:
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:
@@ -53,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.0
uses: actions/setup-node@v4.0.2
with:
cache: 'yarn'
node-version: '20.x'
@@ -68,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 }}
@@ -80,7 +72,7 @@ jobs:
yarn all
- name: Verify Changed files
uses: tj-actions/verify-changed-files@v16
uses: tj-actions/verify-changed-files@v19
id: changed_files
with:
files: |
@@ -104,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
@@ -121,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
@@ -131,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
@@ -157,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
@@ -195,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
@@ -204,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
@@ -253,6 +248,8 @@ jobs:
runs-on: ubuntu-latest
needs: build
if: needs.build.outputs.files_changed != 'true'
permissions:
contents: read
steps:
- name: Checkout branch
@@ -262,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
@@ -286,11 +283,17 @@ jobs:
shell:
bash
test-unset-github-output-env:
name: Test unset GITHUB_OUTPUT env
test-using-branch-names-for-base-sha-and-sha-inputs:
name: Test using branch names for base_sha and sha inputs
runs-on: ubuntu-latest
needs: build
if: needs.build.outputs.files_changed != 'true'
if: |
(
github.event_name == 'push' ||
github.event_name == 'pull_request'
) && needs.build.outputs.files_changed != 'true'
permissions:
contents: read
steps:
- name: Checkout branch
@@ -300,16 +303,15 @@ jobs:
fetch-depth: 0
- name: Download build assets
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: build-assets
- name: Run changed-files with unset GITHUB_OUTPUT env
- name: Run changed-files with main as the base_sha
id: changed-files
continue-on-error: true
uses: ./
env:
GITHUB_OUTPUT: ""
with:
base_sha: main
- name: Show output
run: |
@@ -322,6 +324,8 @@ jobs:
runs-on: ubuntu-latest
needs: build
if: needs.build.outputs.files_changed != 'true'
permissions:
contents: read
strategy:
fail-fast: false
@@ -338,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
@@ -361,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
@@ -369,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
@@ -388,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
@@ -403,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
@@ -422,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
@@ -476,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
@@ -542,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
@@ -557,11 +567,83 @@ jobs:
shell:
bash
test-dir-names-nested-folder:
name: Test changed-files with dir-names in a nested folder
runs-on: ubuntu-latest
needs: build
if: needs.build.outputs.files_changed != 'true'
permissions:
contents: read
steps:
- name: Checkout branch
uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
submodules: true
fetch-depth: 0
- name: Download build assets
uses: actions/download-artifact@v4
with:
name: build-assets
path: dist
- name: Get changed files in the .github folder
id: changed-files
uses: ./
with:
path: .github
json: true
escape_json: false
dir_names: true
dir_names_exclude_current_dir: true
- name: Show output
run: |
echo "${{ toJSON(steps.changed-files.outputs) }}"
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
@@ -577,7 +659,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
@@ -605,6 +687,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
@@ -620,7 +704,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
@@ -652,11 +736,36 @@ jobs:
shell:
bash
- name: Run changed-files with files_yaml, json and write_output_files
id: changed-files-json-write-output-files
uses: ./
with:
files_yaml: |
test:
- .github/workflows/test.yml
json: true
write_output_files: true
- name: Show all outputs
run: |
echo "${{ toJSON(steps.changed-files-json-write-output-files.outputs) }}"
shell:
bash
- name: Show all_changed_files output and list .github/outputs
run: |
echo '${{ toJSON(steps.changed-files-json-write-output-files.outputs.test_all_changed_files) }}'
cat .github/outputs/test_all_changed_files.json
shell:
bash
test-recover-deleted-file:
name: Test changed-files recover deleted file
runs-on: ubuntu-latest
needs: build
if: needs.build.outputs.files_changed != 'true'
permissions:
contents: read
strategy:
fail-fast: false
max-parallel: 4
@@ -672,7 +781,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
@@ -812,11 +921,43 @@ jobs:
cat "deleted_files/test/test deleted.txt"
fi
- name: Run changed-files with recover_deleted_files for an expected git submodule file
id: changed-files-recover-deleted-files-within-submodule
uses: ./
with:
base_sha: "3be651e99d3d4eae395694f6c6f3b9d18457f6c8"
sha: "d90c240f2ad4ec04d8f0f48e5ac290ad96ebe850"
recover_deleted_files: true
fetch_depth: 60000
- name: Show output
run: |
echo "${{ toJSON(steps.changed-files-recover-deleted-files-within-submodule.outputs) }}"
shell:
bash
- name: Verify deleted files
if: steps.changed-files-recover-deleted-files-within-submodule.outputs.deleted_files != 'test/demo/.github/FUNDING.yml'
run: |
echo "Expected: (test/demo/.github/FUNDING.yml) got ${{ steps.changed-files-recover-deleted-files-within-submodule.outputs.deleted_files }}"
exit 1
- name: Verify that test/demo/.github/FUNDING.yml is restored
run: |
if [ ! -f "test/demo/.github/FUNDING.yml" ]; then
echo "Expected: (test/demo/.github/FUNDING.yml) to exist"
exit 1
else
cat "test/demo/.github/FUNDING.yml"
rm "test/demo/.github/FUNDING.yml"
fi
test-dir-names-deleted-files-include-only-deleted-dirs-single-file:
name: Test dir names deleted files include only deleted dirs single file
runs-on: ubuntu-latest
needs: build
if: needs.build.outputs.files_changed != 'true'
permissions:
contents: read
steps:
- name: Checkout branch
uses: actions/checkout@v4
@@ -850,6 +991,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
@@ -891,6 +1034,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
@@ -907,7 +1052,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
@@ -941,6 +1086,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
@@ -956,7 +1103,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
@@ -971,7 +1118,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:
@@ -1941,7 +2088,7 @@ jobs:
bash
- name: Get branch name
id: branch-name
uses: tj-actions/branch-names@v7
uses: tj-actions/branch-names@v8
if: github.event_name == 'pull_request' && matrix.fetch-depth == 0
- uses: nrwl/nx-set-shas@v4
id: last_successful_commit

View File

@@ -1,5 +1,9 @@
name: Format README.md
permissions:
contents: read
pull-requests: write
on:
push:
branches:
@@ -15,12 +19,15 @@ jobs:
- name: Run auto-doc
uses: tj-actions/auto-doc@v3
with:
use_code_blocks: true
use_major_version: true
- name: Run remark
uses: tj-actions/remark@v3
- name: Verify Changed files
uses: tj-actions/verify-changed-files@v16
uses: tj-actions/verify-changed-files@v19
id: verify_changed_files
with:
files: |
@@ -34,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 }}"

1183
HISTORY.md

File diff suppressed because it is too large Load Diff

650
README.md

File diff suppressed because it is too large Load Diff

32
SECURITY.md Normal file
View File

@@ -0,0 +1,32 @@
# Security Policy
## Proactive Security Measures
To proactively detect and address security vulnerabilities, we utilize several robust tools and processes:
- **Dependency Updates:** We use [Renovate](https://renovatebot.com) and [Dependabot](https://docs.github.com/en/code-security/dependabot/dependabot-security-updates/about-dependabot-security-updates) to keep our dependencies updated and promptly patch detected vulnerabilities through automated PRs.
- **[GitHub's Security Features](https://github.com/features/security):** Our repository and dependencies are continuously monitored via GitHub's security features, which include:
- **Code Scanning:** Using GitHub's CodeQL, all pull requests are scanned to identify potential vulnerabilities in our source code.
- **Automated Alerts:** Dependabot identifies vulnerabilities based on the GitHub Advisory Database and opens PRs with patches, while automated [secret scanning](https://docs.github.com/en/enterprise-cloud@latest/code-security/secret-scanning/about-secret-scanning#about-secret-scanning-for-partner-patterns) provides alerts for detected secrets.
- **[GitGuardian Security Checks](https://www.gitguardian.com/):** We employ GitGuardian to ensure security checks are performed on the codebase, enhancing the overall security of our project.
- **Code Analysis and Security Scanning:** With the help of [Codacy Static Code Analysis](https://www.codacy.com/) and [Codacy Security Scan](https://security.codacy.com/), we conduct thorough analyses and scans of our code for potential security risks.
## Reporting Security Vulnerabilities
Despite our best efforts to deliver secure software, we acknowledge the invaluable role of the community in identifying security breaches.
### Private Vulnerability Disclosures
We request all suspected vulnerabilities to be responsibly and privately disclosed by sending an email to [support@tj-actions.online](mailto:support@tj-actions.online).
### Public Vulnerability Disclosures
For publicly disclosed security vulnerabilities, please **IMMEDIATELY** email [support@tj-actions.online](mailto:support@tj-actions.online) with the details for prompt action.
Upon confirmation of a breach, reporters will receive full credit and recognition for their contribution. Please note, that we do not offer monetary compensation for reporting vulnerabilities.
## Communication of Security Breaches
We will utilize the [GitHub Security Advisory](https://github.com/tj-actions/changed-files/security/advisories) to communicate any security breaches. The advisory will be made public once a patch has been released to rectify the issue.
We appreciate your cooperation and contribution to maintaining the security of our software. Remember, a secure community is a strong community.

View File

@@ -4,11 +4,11 @@ author: tj-actions
inputs:
separator:
description: "Split character for output strings"
description: "Split character for output strings."
required: false
default: " "
include_all_old_new_renamed_files:
description: "Include `all_old_new_renamed_files` output. Note this can generate a large output See: [#501](https://github.com/tj-actions/changed-files/issues/501)."
description: "Include `all_old_new_renamed_files` output. Note this can generate a large output See: #501."
required: false
default: "false"
old_new_separator:
@@ -24,11 +24,13 @@ inputs:
required: false
default: ""
files_from_source_file_separator:
description: 'Separator used to split the `files_from_source_file` input'
description: "Separator used to split the `files_from_source_file` input."
default: "\n"
required: false
files:
description: "File and directory patterns used to detect changes (Defaults to the entire repo if unset) **NOTE:** Multiline file/directory patterns should not include quotes."
description: |
File and directory patterns used to detect changes (Defaults to the entire repo if unset).
NOTE: Multiline file/directory patterns should not include quotes.
required: false
default: ""
files_separator:
@@ -40,7 +42,7 @@ inputs:
required: false
default: ""
files_yaml_from_source_file:
description: "Source file(s) used to populate the `files_yaml` input. [Example](https://github.com/tj-actions/changed-files/blob/main/test/changed-files.yml)"
description: "Source file(s) used to populate the `files_yaml` input. Example: https://github.com/tj-actions/changed-files/blob/main/test/changed-files.yml"
required: false
default: ""
files_yaml_from_source_file_separator:
@@ -52,7 +54,7 @@ inputs:
required: false
default: ""
files_ignore_yaml_from_source_file:
description: "Source file(s) used to populate the `files_ignore_yaml` input. [Example](https://github.com/tj-actions/changed-files/blob/main/test/changed-files.yml)"
description: "Source file(s) used to populate the `files_ignore_yaml` input. Example: https://github.com/tj-actions/changed-files/blob/main/test/changed-files.yml"
required: false
default: ""
files_ignore_yaml_from_source_file_separator:
@@ -60,7 +62,7 @@ inputs:
default: "\n"
required: false
files_ignore:
description: "Ignore changes to these file(s) **NOTE:** Multiline file/directory patterns should not include quotes."
description: "Ignore changes to these file(s). NOTE: Multiline file/directory patterns should not include quotes."
required: false
default: ""
files_ignore_separator:
@@ -76,10 +78,10 @@ inputs:
default: "\n"
required: false
sha:
description: "Specify a different commit SHA used for comparing changes"
description: "Specify a different commit SHA or branch used for comparing changes"
required: false
base_sha:
description: "Specify a different base commit SHA used for comparing changes"
description: "Specify a different base commit SHA or branch used for comparing changes"
required: false
since:
description: "Get changed files for commits whose timestamp is older than the given time."
@@ -94,16 +96,16 @@ inputs:
required: false
default: "."
quotepath:
description: "Use non-ascii characters to match files and output the filenames completely verbatim by setting this to `false`"
description: "Use non-ASCII characters to match files and output the filenames completely verbatim by setting this to `false`"
default: "true"
required: false
diff_relative:
description: "Exclude changes outside the current directory and show path names relative to it. **NOTE:** This requires you to specify the top level directory via the `path` input."
description: "Exclude changes outside the current directory and show path names relative to it. NOTE: This requires you to specify the top-level directory via the `path` input."
required: false
default: "true"
dir_names:
default: "false"
description: "Output unique changed directories instead of filenames. **NOTE:** This returns `.` for changed files located in the current working directory which defaults to `$GITHUB_WORKSPACE`."
description: "Output unique changed directories instead of filenames. NOTE: This returns `.` for changed files located in the current working directory which defaults to `$GITHUB_WORKSPACE`."
required: false
dir_names_max_depth:
description: "Limit the directory output to a maximum depth e.g `test/test1/test2` with max depth of `2` returns `test/test1`."
@@ -113,7 +115,7 @@ inputs:
required: false
default: "false"
dir_names_include_files:
description: "Include files in the output when `dir_names` is set to `true`. **NOTE:** This returns only the matching files and also the directory names."
description: "File and directory patterns to include in the output when `dir_names` is set to `true`. NOTE: This returns only the matching files and also the directory names."
required: false
default: ""
dir_names_include_files_separator:
@@ -125,19 +127,25 @@ 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:
description: "Escape JSON output."
required: false
default: "true"
safe_output:
description: "Apply sanitization to output filenames before being set as output."
required: false
default: "true"
fetch_depth:
description: "Depth of additional branch history fetched. **NOTE**: This can be adjusted to resolve errors with insufficient history."
description: "Depth of additional branch history fetched. NOTE: This can be adjusted to resolve errors with insufficient history."
required: false
default: "50"
skip_initial_fetch:
description: "Skip the initial fetch to improve performance for shallow repositories. **NOTE**: This could lead to errors with missing history and the intended use is limited to when you've fetched the history necessary to perform the diff."
description: |
Skip initially fetching additional history to improve performance for shallow repositories.
NOTE: This could lead to errors with missing history. It's intended to be used when you've fetched all necessary history to perform the diff.
required: false
default: "false"
fetch_additional_submodule_history:
@@ -149,7 +157,7 @@ inputs:
required: false
default: "false"
write_output_files:
description: "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`."
description: "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`."
required: false
default: "false"
output_dir:
@@ -169,7 +177,10 @@ inputs:
required: false
default: ""
recover_files:
description: "File and directory patterns used to recover deleted files, defaults to the patterns provided via the `files`, `files_from_source_file`, `files_ignore` and `files_ignore_from_source_file` inputs or all deleted files if no patterns are provided."
description: |
File and directory patterns used to recover deleted files,
defaults to the patterns provided via the `files`, `files_from_source_file`, `files_ignore` and `files_ignore_from_source_file` inputs
or all deleted files if no patterns are provided.
required: false
default: ""
recover_files_separator:
@@ -185,13 +196,17 @@ inputs:
default: "\n"
required: false
token:
description: "Github token used to fetch changed files from Github's API."
description: "GitHub token used to fetch changed files from Github's API."
required: false
default: ${{ github.token }}
api_url:
description: "Github API URL."
required: false
default: ${{ github.api_url }}
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
@@ -200,6 +215,14 @@ inputs:
description: "Fail when the submodule diff fails."
required: false
default: "false"
negation_patterns_first:
description: "Apply the negation patterns first. NOTE: This affects how changed files are matched."
required: false
default: "false"
matrix:
description: "Output changed files in a format that can be used for matrix jobs. Alias for setting inputs `json` to `true` and `escape_json` to `false`."
required: false
default: "false"
outputs:
added_files:
@@ -247,9 +270,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. This defaults to `true` when no patterns are specified. 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:
@@ -259,17 +282,17 @@ outputs:
all_modified_files_count:
description: "Returns the number of `all_modified_files`"
any_modified:
description: "Returns `true` when any of the filenames provided using the `files*` or `files_ignore*` inputs has been modified. i.e. *includes a combination of all added, copied, modified, renamed, and deleted files (ACMRD)*."
description: "Returns `true` when any of the filenames provided using the `files*` or `files_ignore*` inputs have been modified. This defaults to `true` when no patterns are specified. i.e. *includes a combination of all added, copied, modified, renamed, and deleted files (ACMRD)*."
only_modified:
description: "Returns `true` when only files provided using the `files*` or `files_ignore*` inputs has been modified. (ACMRD)."
description: "Returns `true` when only files provided using the `files*` or `files_ignore*` inputs have been modified. (ACMRD)."
other_modified_files:
description: "Returns all other modified files not listed in the files input i.e. *a combination of all added, copied, modified, and deleted files (ACMRD)*"
other_modified_files_count:
description: "Returns the number of `other_modified_files`"
any_deleted:
description: "Returns `true` when any of the filenames provided using the `files*` or `files_ignore*` inputs has been deleted. (D)"
description: "Returns `true` when any of the filenames provided using the `files*` or `files_ignore*` inputs have been deleted. This defaults to `true` when no patterns are specified. (D)"
only_deleted:
description: "Returns `true` when only files provided using the `files*` or `files_ignore*` inputs has been deleted. (D)"
description: "Returns `true` when only files provided using the `files*` or `files_ignore*` inputs have been deleted. (D)"
other_deleted_files:
description: "Returns all other deleted files not listed in the files input i.e. *a combination of all deleted files (D)*"
other_deleted_files_count:

5001
dist/index.js generated vendored

File diff suppressed because it is too large Load Diff

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long

25
dist/licenses.txt generated vendored
View File

@@ -564,31 +564,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
is-plain-object
MIT
The MIT License (MIT)
Copyright (c) 2014-2017, Jon Schlinkert.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
lodash
MIT
Copyright OpenJS Foundation and other contributors <https://openjsf.org/>

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": "39.2.4",
"version": "42.1.0",
"description": "Github action to retrieve all (added, copied, modified, deleted, renamed, type changed, unmerged, unknown) files and directories.",
"main": "lib/main.js",
"publishConfig": {
@@ -8,10 +8,10 @@
},
"scripts": {
"build": "tsc",
"format": "prettier --write **/*.ts",
"format-check": "prettier --check **/*.ts",
"lint": "eslint **/*.ts --max-warnings 0",
"lint:fix": "eslint --fix src/**/*.ts",
"format": "prettier --write src/*.ts src/**/*.ts",
"format-check": "prettier --check src/*.ts src/**/*.ts",
"lint": "eslint src/*.ts src/**/*.ts --max-warnings 0",
"lint:fix": "eslint --fix src/*.ts src/**/*.ts",
"package": "ncc build lib/main.js --source-map --license licenses.txt",
"test": "jest --coverage",
"all": "yarn build && yarn format && yarn lint && yarn package && yarn test"
@@ -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

@@ -0,0 +1,343 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`getInputs should correctly parse boolean inputs 1`] = `
{
"apiUrl": undefined,
"baseSha": undefined,
"diffRelative": "false",
"dirNames": "false",
"dirNamesDeletedFilesIncludeOnlyDeletedDirs": "false",
"dirNamesExcludeCurrentDir": "false",
"dirNamesIncludeFiles": undefined,
"dirNamesIncludeFilesSeparator": undefined,
"escapeJson": false,
"failOnInitialDiffError": "false",
"failOnSubmoduleDiffError": "false",
"fetchAdditionalSubmoduleHistory": "false",
"files": undefined,
"filesFromSourceFile": undefined,
"filesFromSourceFileSeparator": undefined,
"filesIgnore": undefined,
"filesIgnoreFromSourceFile": undefined,
"filesIgnoreFromSourceFileSeparator": undefined,
"filesIgnoreSeparator": undefined,
"filesIgnoreYaml": undefined,
"filesIgnoreYamlFromSourceFile": undefined,
"filesIgnoreYamlFromSourceFileSeparator": undefined,
"filesSeparator": undefined,
"filesYaml": undefined,
"filesYamlFromSourceFile": undefined,
"filesYamlFromSourceFileSeparator": undefined,
"includeAllOldNewRenamedFiles": "false",
"json": true,
"negationPatternsFirst": "false",
"oldNewFilesSeparator": undefined,
"oldNewSeparator": undefined,
"outputDir": undefined,
"outputRenamedFilesAsDeletedAndAdded": "false",
"path": undefined,
"quotepath": "false",
"recoverDeletedFiles": "false",
"recoverDeletedFilesToDestination": undefined,
"recoverFiles": undefined,
"recoverFilesIgnore": undefined,
"recoverFilesIgnoreSeparator": undefined,
"recoverFilesSeparator": undefined,
"safeOutput": "false",
"separator": undefined,
"sha": undefined,
"since": undefined,
"sinceLastRemoteCommit": "false",
"skipInitialFetch": "true",
"token": undefined,
"until": undefined,
"useRestApi": "false",
"writeOutputFiles": "false",
}
`;
exports[`getInputs should correctly parse numeric inputs 1`] = `
{
"apiUrl": "",
"baseSha": "",
"diffRelative": true,
"dirNames": false,
"dirNamesDeletedFilesIncludeOnlyDeletedDirs": false,
"dirNamesExcludeCurrentDir": false,
"dirNamesIncludeFiles": "",
"dirNamesIncludeFilesSeparator": "",
"dirNamesMaxDepth": 2,
"escapeJson": false,
"failOnInitialDiffError": false,
"failOnSubmoduleDiffError": false,
"fetchAdditionalSubmoduleHistory": false,
"fetchDepth": 5,
"files": "",
"filesFromSourceFile": "",
"filesFromSourceFileSeparator": "",
"filesIgnore": "",
"filesIgnoreFromSourceFile": "",
"filesIgnoreFromSourceFileSeparator": "",
"filesIgnoreSeparator": "",
"filesIgnoreYaml": "",
"filesIgnoreYamlFromSourceFile": "",
"filesIgnoreYamlFromSourceFileSeparator": "",
"filesSeparator": "",
"filesYaml": "",
"filesYamlFromSourceFile": "",
"filesYamlFromSourceFileSeparator": "",
"includeAllOldNewRenamedFiles": false,
"json": false,
"negationPatternsFirst": false,
"oldNewFilesSeparator": "",
"oldNewSeparator": "",
"outputDir": "",
"outputRenamedFilesAsDeletedAndAdded": false,
"path": "",
"quotepath": true,
"recoverDeletedFiles": false,
"recoverDeletedFilesToDestination": "",
"recoverFiles": "",
"recoverFilesIgnore": "",
"recoverFilesIgnoreSeparator": "",
"recoverFilesSeparator": "",
"safeOutput": false,
"separator": "",
"sha": "",
"since": "",
"sinceLastRemoteCommit": false,
"skipInitialFetch": false,
"token": "",
"until": "",
"useRestApi": false,
"writeOutputFiles": false,
}
`;
exports[`getInputs should correctly parse string inputs 1`] = `
{
"apiUrl": "https://api.github.com",
"baseSha": "",
"diffRelative": true,
"dirNames": false,
"dirNamesDeletedFilesIncludeOnlyDeletedDirs": false,
"dirNamesExcludeCurrentDir": false,
"dirNamesIncludeFiles": "",
"dirNamesIncludeFilesSeparator": "",
"escapeJson": false,
"failOnInitialDiffError": false,
"failOnSubmoduleDiffError": false,
"fetchAdditionalSubmoduleHistory": false,
"files": "",
"filesFromSourceFile": "",
"filesFromSourceFileSeparator": "",
"filesIgnore": "",
"filesIgnoreFromSourceFile": "",
"filesIgnoreFromSourceFileSeparator": "",
"filesIgnoreSeparator": "",
"filesIgnoreYaml": "",
"filesIgnoreYamlFromSourceFile": "",
"filesIgnoreYamlFromSourceFileSeparator": "",
"filesSeparator": "",
"filesYaml": "",
"filesYamlFromSourceFile": "",
"filesYamlFromSourceFileSeparator": "",
"includeAllOldNewRenamedFiles": false,
"json": false,
"negationPatternsFirst": false,
"oldNewFilesSeparator": "",
"oldNewSeparator": "",
"outputDir": "",
"outputRenamedFilesAsDeletedAndAdded": false,
"path": "",
"quotepath": true,
"recoverDeletedFiles": false,
"recoverDeletedFilesToDestination": "",
"recoverFiles": "",
"recoverFilesIgnore": "",
"recoverFilesIgnoreSeparator": "",
"recoverFilesSeparator": "",
"safeOutput": false,
"separator": "",
"sha": "",
"since": "",
"sinceLastRemoteCommit": false,
"skipInitialFetch": false,
"token": "token",
"until": "",
"useRestApi": false,
"writeOutputFiles": false,
}
`;
exports[`getInputs should handle invalid numeric inputs correctly 1`] = `
{
"apiUrl": "",
"baseSha": "",
"diffRelative": true,
"dirNames": false,
"dirNamesDeletedFilesIncludeOnlyDeletedDirs": false,
"dirNamesExcludeCurrentDir": false,
"dirNamesIncludeFiles": "",
"dirNamesIncludeFilesSeparator": "",
"dirNamesMaxDepth": 2,
"escapeJson": false,
"failOnInitialDiffError": false,
"failOnSubmoduleDiffError": false,
"fetchAdditionalSubmoduleHistory": false,
"fetchDepth": NaN,
"files": "",
"filesFromSourceFile": "",
"filesFromSourceFileSeparator": "",
"filesIgnore": "",
"filesIgnoreFromSourceFile": "",
"filesIgnoreFromSourceFileSeparator": "",
"filesIgnoreSeparator": "",
"filesIgnoreYaml": "",
"filesIgnoreYamlFromSourceFile": "",
"filesIgnoreYamlFromSourceFileSeparator": "",
"filesSeparator": "",
"filesYaml": "",
"filesYamlFromSourceFile": "",
"filesYamlFromSourceFileSeparator": "",
"includeAllOldNewRenamedFiles": false,
"json": false,
"negationPatternsFirst": false,
"oldNewFilesSeparator": "",
"oldNewSeparator": "",
"outputDir": "",
"outputRenamedFilesAsDeletedAndAdded": false,
"path": "",
"quotepath": true,
"recoverDeletedFiles": false,
"recoverDeletedFilesToDestination": "",
"recoverFiles": "",
"recoverFilesIgnore": "",
"recoverFilesIgnoreSeparator": "",
"recoverFilesSeparator": "",
"safeOutput": false,
"separator": "",
"sha": "",
"since": "",
"sinceLastRemoteCommit": false,
"skipInitialFetch": false,
"token": "",
"until": "",
"useRestApi": false,
"writeOutputFiles": false,
}
`;
exports[`getInputs should handle negative numeric inputs correctly 1`] = `
{
"apiUrl": "",
"baseSha": "",
"diffRelative": true,
"dirNames": false,
"dirNamesDeletedFilesIncludeOnlyDeletedDirs": false,
"dirNamesExcludeCurrentDir": false,
"dirNamesIncludeFiles": "",
"dirNamesIncludeFilesSeparator": "",
"dirNamesMaxDepth": -2,
"escapeJson": false,
"failOnInitialDiffError": false,
"failOnSubmoduleDiffError": false,
"fetchAdditionalSubmoduleHistory": false,
"fetchDepth": 2,
"files": "",
"filesFromSourceFile": "",
"filesFromSourceFileSeparator": "",
"filesIgnore": "",
"filesIgnoreFromSourceFile": "",
"filesIgnoreFromSourceFileSeparator": "",
"filesIgnoreSeparator": "",
"filesIgnoreYaml": "",
"filesIgnoreYamlFromSourceFile": "",
"filesIgnoreYamlFromSourceFileSeparator": "",
"filesSeparator": "",
"filesYaml": "",
"filesYamlFromSourceFile": "",
"filesYamlFromSourceFileSeparator": "",
"includeAllOldNewRenamedFiles": false,
"json": false,
"negationPatternsFirst": false,
"oldNewFilesSeparator": "",
"oldNewSeparator": "",
"outputDir": "",
"outputRenamedFilesAsDeletedAndAdded": false,
"path": "",
"quotepath": true,
"recoverDeletedFiles": false,
"recoverDeletedFilesToDestination": "",
"recoverFiles": "",
"recoverFilesIgnore": "",
"recoverFilesIgnoreSeparator": "",
"recoverFilesSeparator": "",
"safeOutput": false,
"separator": "",
"sha": "",
"since": "",
"sinceLastRemoteCommit": false,
"skipInitialFetch": false,
"token": "",
"until": "",
"useRestApi": false,
"writeOutputFiles": false,
}
`;
exports[`getInputs should return default values when no inputs are provided 1`] = `
{
"apiUrl": undefined,
"baseSha": undefined,
"diffRelative": true,
"dirNames": false,
"dirNamesDeletedFilesIncludeOnlyDeletedDirs": false,
"dirNamesExcludeCurrentDir": false,
"dirNamesIncludeFiles": undefined,
"dirNamesIncludeFilesSeparator": undefined,
"escapeJson": false,
"failOnInitialDiffError": false,
"failOnSubmoduleDiffError": false,
"fetchAdditionalSubmoduleHistory": false,
"files": undefined,
"filesFromSourceFile": undefined,
"filesFromSourceFileSeparator": undefined,
"filesIgnore": undefined,
"filesIgnoreFromSourceFile": undefined,
"filesIgnoreFromSourceFileSeparator": undefined,
"filesIgnoreSeparator": undefined,
"filesIgnoreYaml": undefined,
"filesIgnoreYamlFromSourceFile": undefined,
"filesIgnoreYamlFromSourceFileSeparator": undefined,
"filesSeparator": undefined,
"filesYaml": undefined,
"filesYamlFromSourceFile": undefined,
"filesYamlFromSourceFileSeparator": undefined,
"includeAllOldNewRenamedFiles": false,
"json": false,
"negationPatternsFirst": false,
"oldNewFilesSeparator": undefined,
"oldNewSeparator": undefined,
"outputDir": undefined,
"outputRenamedFilesAsDeletedAndAdded": false,
"path": undefined,
"quotepath": true,
"recoverDeletedFiles": false,
"recoverDeletedFilesToDestination": undefined,
"recoverFiles": undefined,
"recoverFilesIgnore": undefined,
"recoverFilesIgnoreSeparator": undefined,
"recoverFilesSeparator": undefined,
"safeOutput": false,
"separator": undefined,
"sha": undefined,
"since": undefined,
"sinceLastRemoteCommit": false,
"skipInitialFetch": false,
"token": undefined,
"until": undefined,
"useRestApi": false,
"writeOutputFiles": false,
}
`;

View File

@@ -0,0 +1,153 @@
import * as core from '@actions/core'
import {getInputs, Inputs} from '../inputs'
import {DEFAULT_VALUES_OF_UNSUPPORTED_API_INPUTS} from '../constant'
jest.mock('@actions/core')
describe('getInputs', () => {
afterEach(() => {
jest.clearAllMocks()
})
test('should return default values when no inputs are provided', () => {
;(core.getBooleanInput as jest.Mock).mockImplementation(name => {
const camelCaseName = name.replace(/_([a-z])/g, (g: string[]) => {
return g[1].toUpperCase()
}) as keyof Inputs
return (DEFAULT_VALUES_OF_UNSUPPORTED_API_INPUTS[camelCaseName] ||
'') as string
})
;(core.getBooleanInput as jest.Mock).mockImplementation(name => {
const camelCaseName = name.replace(/_([a-z])/g, (g: string[]) => {
return g[1].toUpperCase()
}) as keyof Inputs
return (DEFAULT_VALUES_OF_UNSUPPORTED_API_INPUTS[camelCaseName] ||
false) as boolean
})
expect(getInputs()).toMatchSnapshot()
})
test('should correctly parse boolean inputs', () => {
;(core.getBooleanInput as jest.Mock).mockImplementation(name => {
const camelCaseName = name.replace(/_([a-z])/g, (g: string[]) => {
return g[1].toUpperCase()
}) as keyof Inputs
return (DEFAULT_VALUES_OF_UNSUPPORTED_API_INPUTS[camelCaseName] ||
'') as string
})
;(core.getBooleanInput as jest.Mock).mockImplementation(name => {
switch (name) {
case 'matrix':
return 'true'
case 'skip_initial_fetch':
return 'true'
default:
return 'false'
}
})
expect(getInputs()).toMatchSnapshot()
})
test('should handle matrix alias correctly', () => {
;(core.getBooleanInput as jest.Mock).mockImplementation(name => {
return name === 'matrix' ? 'true' : 'false'
})
const inputs = getInputs()
expect(inputs).toHaveProperty('json', true)
expect(inputs).toHaveProperty('escapeJson', false)
})
test('should correctly parse string inputs', () => {
;(core.getInput as jest.Mock).mockImplementation(name => {
switch (name) {
case 'token':
return 'token'
case 'api_url':
return 'https://api.github.com'
default:
return ''
}
})
;(core.getBooleanInput as jest.Mock).mockImplementation(name => {
const camelCaseName = name.replace(/_([a-z])/g, (g: string[]) => {
return g[1].toUpperCase()
}) as keyof Inputs
return (DEFAULT_VALUES_OF_UNSUPPORTED_API_INPUTS[camelCaseName] ||
false) as boolean
})
expect(getInputs()).toMatchSnapshot()
})
test('should correctly parse numeric inputs', () => {
;(core.getInput as jest.Mock).mockImplementation(name => {
switch (name) {
case 'fetch_depth':
return '5'
case 'dir_names_max_depth':
return '2'
default:
return ''
}
})
;(core.getBooleanInput as jest.Mock).mockImplementation(name => {
const camelCaseName = name.replace(/_([a-z])/g, (g: string[]) => {
return g[1].toUpperCase()
}) as keyof Inputs
return (DEFAULT_VALUES_OF_UNSUPPORTED_API_INPUTS[camelCaseName] ||
false) as boolean
})
expect(getInputs()).toMatchSnapshot()
})
test('should handle invalid numeric inputs correctly', () => {
;(core.getInput as jest.Mock).mockImplementation(name => {
// TODO: Add validation for invalid numbers which should result in an error instead of NaN
switch (name) {
case 'fetch_depth':
return 'invalid'
case 'dir_names_max_depth':
return '2'
default:
return ''
}
})
;(core.getBooleanInput as jest.Mock).mockImplementation(name => {
const camelCaseName = name.replace(/_([a-z])/g, (g: string[]) => {
return g[1].toUpperCase()
}) as keyof Inputs
return (DEFAULT_VALUES_OF_UNSUPPORTED_API_INPUTS[camelCaseName] ||
false) as boolean
})
expect(getInputs()).toMatchSnapshot()
})
test('should handle negative numeric inputs correctly', () => {
;(core.getInput as jest.Mock).mockImplementation(name => {
// TODO: Add validation for negative numbers which should result in an error
switch (name) {
case 'fetch_depth':
return '-5'
case 'dir_names_max_depth':
return '-2'
default:
return ''
}
})
;(core.getBooleanInput as jest.Mock).mockImplementation(name => {
const camelCaseName = name.replace(/_([a-z])/g, (g: string[]) => {
return g[1].toUpperCase()
}) as keyof Inputs
return (DEFAULT_VALUES_OF_UNSUPPORTED_API_INPUTS[camelCaseName] ||
false) as boolean
})
expect(getInputs()).toMatchSnapshot()
})
})

View File

@@ -1,5 +0,0 @@
describe('main test', () => {
it('adds two numbers', async () => {
expect(1 + 1).toEqual(2)
})
})

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

@@ -43,7 +43,8 @@ export const setOutputsAndGetModifiedAndChangedFilesStatus = async ({
writeOutputFiles: inputs.writeOutputFiles,
outputDir: inputs.outputDir,
json: inputs.json,
shouldEscape: inputs.escapeJson
shouldEscape: inputs.escapeJson,
safeOutput: inputs.safeOutput
})
await setOutput({
key: getOutputKey('added_files_count', outputPrefix),
@@ -64,7 +65,8 @@ export const setOutputsAndGetModifiedAndChangedFilesStatus = async ({
writeOutputFiles: inputs.writeOutputFiles,
outputDir: inputs.outputDir,
json: inputs.json,
shouldEscape: inputs.escapeJson
shouldEscape: inputs.escapeJson,
safeOutput: inputs.safeOutput
})
await setOutput({
@@ -86,7 +88,8 @@ export const setOutputsAndGetModifiedAndChangedFilesStatus = async ({
writeOutputFiles: inputs.writeOutputFiles,
outputDir: inputs.outputDir,
json: inputs.json,
shouldEscape: inputs.escapeJson
shouldEscape: inputs.escapeJson,
safeOutput: inputs.safeOutput
})
await setOutput({
@@ -108,7 +111,8 @@ export const setOutputsAndGetModifiedAndChangedFilesStatus = async ({
writeOutputFiles: inputs.writeOutputFiles,
outputDir: inputs.outputDir,
json: inputs.json,
shouldEscape: inputs.escapeJson
shouldEscape: inputs.escapeJson,
safeOutput: inputs.safeOutput
})
await setOutput({
@@ -130,7 +134,8 @@ export const setOutputsAndGetModifiedAndChangedFilesStatus = async ({
writeOutputFiles: inputs.writeOutputFiles,
outputDir: inputs.outputDir,
json: inputs.json,
shouldEscape: inputs.escapeJson
shouldEscape: inputs.escapeJson,
safeOutput: inputs.safeOutput
})
await setOutput({
@@ -152,7 +157,8 @@ export const setOutputsAndGetModifiedAndChangedFilesStatus = async ({
writeOutputFiles: inputs.writeOutputFiles,
outputDir: inputs.outputDir,
json: inputs.json,
shouldEscape: inputs.escapeJson
shouldEscape: inputs.escapeJson,
safeOutput: inputs.safeOutput
})
await setOutput({
@@ -174,7 +180,8 @@ export const setOutputsAndGetModifiedAndChangedFilesStatus = async ({
writeOutputFiles: inputs.writeOutputFiles,
outputDir: inputs.outputDir,
json: inputs.json,
shouldEscape: inputs.escapeJson
shouldEscape: inputs.escapeJson,
safeOutput: inputs.safeOutput
})
await setOutput({
@@ -199,7 +206,8 @@ export const setOutputsAndGetModifiedAndChangedFilesStatus = async ({
writeOutputFiles: inputs.writeOutputFiles,
outputDir: inputs.outputDir,
json: inputs.json,
shouldEscape: inputs.escapeJson
shouldEscape: inputs.escapeJson,
safeOutput: inputs.safeOutput
})
await setOutput({
@@ -226,7 +234,8 @@ export const setOutputsAndGetModifiedAndChangedFilesStatus = async ({
writeOutputFiles: inputs.writeOutputFiles,
outputDir: inputs.outputDir,
json: inputs.json,
shouldEscape: inputs.escapeJson
shouldEscape: inputs.escapeJson,
safeOutput: inputs.safeOutput
})
await setOutput({
@@ -238,7 +247,7 @@ export const setOutputsAndGetModifiedAndChangedFilesStatus = async ({
await setOutput({
key: getOutputKey('any_changed', outputPrefix),
value: allChangedFiles.paths.length > 0 && filePatterns.length > 0,
value: allChangedFiles.paths.length > 0,
writeOutputFiles: inputs.writeOutputFiles,
outputDir: inputs.outputDir,
json: inputs.json
@@ -314,7 +323,8 @@ export const setOutputsAndGetModifiedAndChangedFilesStatus = async ({
writeOutputFiles: inputs.writeOutputFiles,
outputDir: inputs.outputDir,
json: inputs.json,
shouldEscape: inputs.escapeJson
shouldEscape: inputs.escapeJson,
safeOutput: inputs.safeOutput
})
await setOutput({
@@ -326,7 +336,7 @@ export const setOutputsAndGetModifiedAndChangedFilesStatus = async ({
await setOutput({
key: getOutputKey('any_modified', outputPrefix),
value: allModifiedFiles.paths.length > 0 && filePatterns.length > 0,
value: allModifiedFiles.paths.length > 0,
writeOutputFiles: inputs.writeOutputFiles,
outputDir: inputs.outputDir,
json: inputs.json
@@ -419,7 +429,8 @@ export const setOutputsAndGetModifiedAndChangedFilesStatus = async ({
writeOutputFiles: inputs.writeOutputFiles,
outputDir: inputs.outputDir,
json: inputs.json,
shouldEscape: inputs.escapeJson
shouldEscape: inputs.escapeJson,
safeOutput: inputs.safeOutput
})
await setOutput({
@@ -431,7 +442,7 @@ export const setOutputsAndGetModifiedAndChangedFilesStatus = async ({
await setOutput({
key: getOutputKey('any_deleted', outputPrefix),
value: deletedFiles.paths.length > 0 && filePatterns.length > 0,
value: deletedFiles.paths.length > 0,
writeOutputFiles: inputs.writeOutputFiles,
outputDir: inputs.outputDir,
json: inputs.json
@@ -485,7 +496,7 @@ export const setOutputsAndGetModifiedAndChangedFilesStatus = async ({
})
return {
anyModified: allModifiedFiles.paths.length > 0 && filePatterns.length > 0,
anyChanged: allChangedFiles.paths.length > 0 && filePatterns.length > 0
anyModified: allModifiedFiles.paths.length > 0,
anyChanged: allChangedFiles.paths.length > 0
}
}

View File

@@ -5,6 +5,7 @@ import {Env} from './env'
import {Inputs} from './inputs'
import {
canDiffCommits,
cleanShaInput,
getCurrentBranchName,
getHeadSha,
getParentSha,
@@ -23,7 +24,11 @@ const getCurrentSHA = async ({
inputs: Inputs
workingDirectory: string
}): Promise<string> => {
let currentSha = inputs.sha
let currentSha = await cleanShaInput({
sha: inputs.sha,
cwd: workingDirectory,
token: inputs.token
})
core.debug('Getting current SHA...')
if (inputs.until) {
@@ -147,7 +152,7 @@ export const getSHAForNonPullRequestEvent = async (
})
}
} else {
if (hasSubmodule && inputs.fetchSubmoduleHistory) {
if (hasSubmodule && inputs.fetchAdditionalSubmoduleHistory) {
await gitFetchSubmodules({
cwd: workingDirectory,
args: [
@@ -162,7 +167,11 @@ export const getSHAForNonPullRequestEvent = async (
}
const currentSha = await getCurrentSHA({inputs, workingDirectory})
let previousSha = inputs.baseSha
let previousSha = await cleanShaInput({
sha: inputs.baseSha,
cwd: workingDirectory,
token: inputs.token
})
const diff = '..'
const currentBranchName = await getCurrentBranchName({cwd: workingDirectory})
@@ -175,7 +184,7 @@ export const getSHAForNonPullRequestEvent = async (
currentBranch = currentBranchName
}
if (previousSha && currentSha && currentBranch && targetBranch) {
if (inputs.baseSha && inputs.sha && currentBranch && targetBranch) {
if (previousSha === currentSha) {
core.error(
`Similar commit hashes detected: previous sha: ${previousSha} is equivalent to the current sha: ${currentSha}.`
@@ -186,7 +195,6 @@ export const getSHAForNonPullRequestEvent = async (
throw new Error('Similar commit hashes detected.')
}
await verifyCommitSha({sha: previousSha, cwd: workingDirectory})
core.debug(`Previous SHA: ${previousSha}`)
return {
@@ -198,7 +206,7 @@ export const getSHAForNonPullRequestEvent = async (
}
}
if (!previousSha) {
if (!previousSha || previousSha === currentSha) {
core.debug('Getting previous SHA...')
if (inputs.since) {
core.debug(`Getting base SHA for '${inputs.since}'...`)
@@ -374,7 +382,7 @@ export const getSHAForPullRequestEvent = async (
}
}
} else {
if (hasSubmodule && inputs.fetchSubmoduleHistory) {
if (hasSubmodule && inputs.fetchAdditionalSubmoduleHistory) {
await gitFetchSubmodules({
cwd: workingDirectory,
args: [
@@ -390,10 +398,14 @@ export const getSHAForPullRequestEvent = async (
}
const currentSha = await getCurrentSHA({inputs, workingDirectory})
let previousSha = inputs.baseSha
let previousSha = await cleanShaInput({
sha: inputs.baseSha,
cwd: workingDirectory,
token: inputs.token
})
let diff = '...'
if (previousSha && currentSha && currentBranch && targetBranch) {
if (inputs.baseSha && inputs.sha && currentBranch && targetBranch) {
if (previousSha === currentSha) {
core.error(
`Similar commit hashes detected: previous sha: ${previousSha} is equivalent to the current sha: ${currentSha}.`
@@ -404,7 +416,6 @@ export const getSHAForPullRequestEvent = async (
throw new Error('Similar commit hashes detected.')
}
await verifyCommitSha({sha: previousSha, cwd: workingDirectory})
core.debug(`Previous SHA: ${previousSha}`)
return {
@@ -418,12 +429,12 @@ 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 = '..'
}
if (!previousSha) {
if (!previousSha || previousSha === currentSha) {
if (inputs.sinceLastRemoteCommit) {
previousSha = github.context.payload.before

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
@@ -34,8 +34,9 @@ export type Inputs = {
dirNamesDeletedFilesIncludeOnlyDeletedDirs: boolean
json: boolean
escapeJson: boolean
safeOutput: boolean
fetchDepth?: number
fetchSubmoduleHistory: boolean
fetchAdditionalSubmoduleHistory: boolean
sinceLastRemoteCommit: boolean
writeOutputFiles: boolean
outputDir: string
@@ -51,6 +52,8 @@ export type Inputs = {
skipInitialFetch: boolean
failOnInitialDiffError: boolean
failOnSubmoduleDiffError: boolean
negationPatternsFirst: boolean
useRestApi: boolean
}
export const getInputs = (): Inputs => {
@@ -129,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', {
@@ -151,8 +154,16 @@ export const getInputs = (): Inputs => {
trimWhitespace: false
}
)
const json = core.getBooleanInput('json', {required: false})
const escapeJson = core.getBooleanInput('escape_json', {required: false})
let json = core.getBooleanInput('json', {required: false})
let escapeJson = core.getBooleanInput('escape_json', {required: false})
const matrix = core.getBooleanInput('matrix', {required: false})
if (matrix) {
json = true
escapeJson = false
}
const safeOutput = core.getBooleanInput('safe_output', {required: false})
const fetchDepth = core.getInput('fetch_depth', {required: false})
const sinceLastRemoteCommit = core.getBooleanInput(
'since_last_remote_commit',
@@ -193,7 +204,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
@@ -218,6 +229,17 @@ export const getInputs = (): Inputs => {
}
)
const negationPatternsFirst = core.getBooleanInput(
'negation_patterns_first',
{
required: false
}
)
const useRestApi = core.getBooleanInput('use_rest_api', {
required: false
})
const inputs: Inputs = {
files,
filesSeparator,
@@ -242,7 +264,7 @@ export const getInputs = (): Inputs => {
since,
until,
path,
quotePath,
quotepath,
diffRelative,
sinceLastRemoteCommit,
recoverDeletedFiles,
@@ -255,7 +277,7 @@ export const getInputs = (): Inputs => {
oldNewSeparator,
oldNewFilesSeparator,
skipInitialFetch,
fetchSubmoduleHistory,
fetchAdditionalSubmoduleHistory,
dirNamesDeletedFilesIncludeOnlyDeletedDirs,
// End Not Supported via REST API
dirNames,
@@ -264,11 +286,14 @@ export const getInputs = (): Inputs => {
dirNamesIncludeFilesSeparator,
json,
escapeJson,
safeOutput,
writeOutputFiles,
outputDir,
outputRenamedFilesAsDeletedAndAdded,
token,
apiUrl
apiUrl,
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
})
@@ -144,7 +145,9 @@ const getChangedFilesFromLocalGitHistory = async ({
workingDirectory,
deletedFiles: allDiffFiles[ChangeTypeEnum.Deleted],
recoverPatterns,
sha: diffResult.previousSha
diffResult,
hasSubmodule,
submodulePaths
})
}
@@ -171,7 +174,8 @@ const getChangedFilesFromLocalGitHistory = async ({
value: allOldNewRenamedFiles.paths,
writeOutputFiles: inputs.writeOutputFiles,
outputDir: inputs.outputDir,
json: inputs.json
json: inputs.json,
safeOutput: inputs.safeOutput
})
await setOutput({
key: 'all_old_new_renamed_files_count',
@@ -221,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}`)
@@ -240,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,
@@ -276,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')
@@ -298,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

@@ -1,14 +1,16 @@
/*global AsyncIterableIterator*/
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'
@@ -169,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
}
}
@@ -283,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,
@@ -331,6 +335,7 @@ export const gitFetchSubmodules = async ({
/**
* Retrieves all the submodule paths
* @param cwd - working directory
* @returns submodule paths
*/
export const getSubmodulePath = async ({
cwd
@@ -365,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,
@@ -674,6 +680,12 @@ export const isInsideWorkTree = async ({
}
)
if (stdout.trim() !== 'true') {
core.warning(
`The current working directory is not inside a git repository: ${cwd}`
)
}
return stdout.trim() === 'true'
}
@@ -771,6 +783,56 @@ export const verifyCommitSha = async ({
return exitCode
}
/**
* Clean the sha from the input which could be a branch name or a commit sha.
*
* If the input is a valid commit sha, return it as is.
*
* If the input is a branch name, get the HEAD sha of that branch and return it.
*
* @param sha The input string, which could be a branch name or a commit sha.
* @param cwd The working directory.
* @param token The GitHub token.
* @returns The cleaned SHA string.
*/
export const cleanShaInput = async ({
sha,
cwd,
token
}: {
sha: string
cwd: string
token: string
}): Promise<string> => {
// Check if the input is a valid commit sha
if (!sha) {
return sha
}
// Check if the input is a valid commit sha
const {stdout, exitCode} = await exec.getExecOutput(
'git',
['rev-parse', '--verify', `${sha}^{commit}`],
{
cwd,
ignoreReturnCode: true,
silent: !core.isDebug()
}
)
if (exitCode !== 0) {
const octokit = github.getOctokit(token)
// If it's not a valid commit sha, assume it's a branch name and get the HEAD sha
const {data: refData} = await octokit.rest.git.getRef({
owner: github.context.repo.owner,
repo: github.context.repo.repo,
ref: `heads/${sha}`
})
return refData.object.sha
}
return stdout.trim()
}
export const getPreviousGitTag = async ({
cwd
}: {
@@ -846,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,
@@ -938,77 +1000,101 @@ export const getFilePatterns = async ({
inputs: Inputs
workingDirectory: string
}): Promise<string[]> => {
let filePatterns = inputs.files
.split(inputs.filesSeparator)
.filter(Boolean)
.join('\n')
let cleanedFilePatterns: string[] = []
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')}`)
}
if (inputs.filesFromSourceFile !== '') {
const inputFilesFromSourceFile = inputs.filesFromSourceFile
.split(inputs.filesFromSourceFileSeparator)
.filter(p => p !== '')
.filter(Boolean)
.map(p => path.join(workingDirectory, p))
core.debug(`files from source file: ${inputFilesFromSourceFile}`)
const filesFromSourceFiles = (
await getFilesFromSourceFile({filePaths: inputFilesFromSourceFile})
).join('\n')
const filesFromSourceFiles = await getFilesFromSourceFile({
filePaths: inputFilesFromSourceFile
})
core.debug(`files from source files patterns: ${filesFromSourceFiles}`)
core.debug(
`files from source files patterns: ${filesFromSourceFiles.join('\n')}`
)
filePatterns = filePatterns.concat('\n', filesFromSourceFiles)
cleanedFilePatterns.push(...filesFromSourceFiles)
}
if (inputs.filesIgnore) {
const filesIgnorePatterns = inputs.filesIgnore
.split(inputs.filesIgnoreSeparator)
.filter(p => p !== '')
.filter(Boolean)
.map(p => {
if (!p.startsWith('!')) {
p = `!${p}`
p = p.startsWith('!') ? p : `!${p}`
if (p.endsWith(path.sep)) {
p = `${p}**`
}
return p
})
.join('\n')
core.debug(`files ignore patterns: ${filesIgnorePatterns}`)
core.debug(`files ignore patterns: ${filesIgnorePatterns.join('\n')}`)
filePatterns = filePatterns.concat('\n', filesIgnorePatterns)
cleanedFilePatterns.push(...filesIgnorePatterns)
}
if (inputs.filesIgnoreFromSourceFile) {
const inputFilesIgnoreFromSourceFile = inputs.filesIgnoreFromSourceFile
.split(inputs.filesIgnoreFromSourceFileSeparator)
.filter(p => p !== '')
.filter(Boolean)
.map(p => path.join(workingDirectory, p))
core.debug(
`files ignore from source file: ${inputFilesIgnoreFromSourceFile}`
)
const filesIgnoreFromSourceFiles = (
await getFilesFromSourceFile({
filePaths: inputFilesIgnoreFromSourceFile,
excludedFiles: true
})
).join('\n')
const filesIgnoreFromSourceFiles = await getFilesFromSourceFile({
filePaths: inputFilesIgnoreFromSourceFile,
excludedFiles: true
})
core.debug(
`files ignore from source files patterns: ${filesIgnoreFromSourceFiles}`
`files ignore from source files patterns: ${filesIgnoreFromSourceFiles.join(
'\n'
)}`
)
filePatterns = filePatterns.concat('\n', filesIgnoreFromSourceFiles)
cleanedFilePatterns.push(...filesIgnoreFromSourceFiles)
}
if (inputs.negationPatternsFirst) {
cleanedFilePatterns.sort((a, b) => {
return a.startsWith('!') ? -1 : b.startsWith('!') ? 1 : 0
})
}
// Reorder file patterns '**' should come first
if (cleanedFilePatterns.includes('**')) {
cleanedFilePatterns.sort((a, b) => {
return a === '**' ? -1 : b === '**' ? 1 : 0
})
}
if (isWindows()) {
filePatterns = filePatterns.replace(/\r\n/g, '\n')
filePatterns = filePatterns.replace(/\r/g, '\n')
cleanedFilePatterns = cleanedFilePatterns.map(pattern =>
pattern.replace(/\r\n/g, '\n').replace(/\r/g, '\n')
)
}
core.debug(`Input file patterns: ${filePatterns}`)
core.debug(`Input file patterns: \n${cleanedFilePatterns.join('\n')}`)
return filePatterns.trim().split('\n').filter(Boolean)
return cleanedFilePatterns
}
// Example YAML input:
@@ -1054,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
}
@@ -1250,7 +1336,8 @@ export const setArrayOutput = async ({
writeOutputFiles: inputs.writeOutputFiles,
outputDir: inputs.outputDir,
json: inputs.json,
shouldEscape: inputs.escapeJson
shouldEscape: inputs.escapeJson,
safeOutput: inputs.safeOutput
})
}
@@ -1260,7 +1347,8 @@ export const setOutput = async ({
writeOutputFiles,
outputDir,
json = false,
shouldEscape = false
shouldEscape = false,
safeOutput = false
}: {
key: string
value: string | string[] | boolean
@@ -1268,6 +1356,7 @@ export const setOutput = async ({
outputDir: string
json?: boolean
shouldEscape?: boolean
safeOutput?: boolean
}): Promise<void> => {
let cleanedValue
if (json) {
@@ -1276,6 +1365,11 @@ export const setOutput = async ({
cleanedValue = value.toString().trim()
}
// if safeOutput is true, escape special characters for bash shell
if (safeOutput) {
cleanedValue = cleanedValue.replace(/[^\x20-\x7E]|[:*?<>|;`$()&!]/g, '\\$&')
}
core.setOutput(key, cleanedValue)
if (writeOutputFiles) {
@@ -1322,13 +1416,17 @@ export const recoverDeletedFiles = async ({
workingDirectory,
deletedFiles,
recoverPatterns,
sha
diffResult,
hasSubmodule,
submodulePaths
}: {
inputs: Inputs
workingDirectory: string
deletedFiles: string[]
recoverPatterns: string[]
sha: string
diffResult: DiffResult
hasSubmodule: boolean
submodulePaths: string[]
}): Promise<void> => {
let recoverableDeletedFiles = deletedFiles
core.debug(`recoverable deleted files: ${recoverableDeletedFiles}`)
@@ -1353,19 +1451,64 @@ export const recoverDeletedFiles = async ({
)
}
const deletedFileContents = await getDeletedFileContents({
cwd: workingDirectory,
filePath: deletedFile,
sha
})
let deletedFileContents: string
const submodulePath = submodulePaths.find(p => deletedFile.startsWith(p))
if (hasSubmodule && submodulePath) {
const submoduleShaResult = await gitSubmoduleDiffSHA({
cwd: workingDirectory,
parentSha1: diffResult.previousSha,
parentSha2: diffResult.currentSha,
submodulePath,
diff: diffResult.diff
})
if (submoduleShaResult.previousSha) {
core.debug(
`recovering deleted file "${deletedFile}" from submodule ${submodulePath} from ${submoduleShaResult.previousSha}`
)
deletedFileContents = await getDeletedFileContents({
cwd: path.join(workingDirectory, submodulePath),
// E.g. submodulePath = test/demo and deletedFile = test/demo/.github/README.md => filePath => .github/README.md
filePath: deletedFile.replace(submodulePath, '').substring(1),
sha: submoduleShaResult.previousSha
})
} else {
core.warning(
`Unable to recover deleted file "${deletedFile}" from submodule ${submodulePath} from ${submoduleShaResult.previousSha}`
)
continue
}
} else {
core.debug(
`recovering deleted file "${deletedFile}" from ${diffResult.previousSha}`
)
deletedFileContents = await getDeletedFileContents({
cwd: workingDirectory,
filePath: deletedFile,
sha: diffResult.previousSha
})
}
core.debug(`recovered deleted file "${deletedFile}"`)
if (!(await exists(path.dirname(target)))) {
core.debug(`creating directory "${path.dirname(target)}"`)
await fs.mkdir(path.dirname(target), {recursive: true})
}
core.debug(`writing file "${target}"`)
await fs.writeFile(target, deletedFileContents)
core.debug(`wrote file "${target}"`)
}
}
/**
* 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
}: {
@@ -1375,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`
)
}
}
}

1689
yarn.lock

File diff suppressed because it is too large Load Diff