Compare commits

...

389 Commits

Author SHA1 Message Date
dependabot[bot]
c65cd88342 chore(deps-dev): bump @types/node from 20.14.13 to 22.0.0 (#2215)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-29 18:55:58 -06:00
renovate[bot]
9f928e3005 chore(deps): update typescript-eslint monorepo to v7.18.0 2024-07-29 19:48:16 +00:00
renovate[bot]
fb1b47b727 chore(deps): update dependency @types/node to v20.14.13 2024-07-28 10:21:23 +00:00
GitHub Action
a77ecbc238 Added missing changes and modified dist assets. 2024-07-27 03:56:35 +00:00
renovate[bot]
e4fe134b73 fix(deps): update dependency @stdlib/utils-convert-path to v0.2.2 2024-07-27 03:56:35 +00:00
Tonye Jack
f5a7145f2b fix: error with pull_request closed test (#2211) 2024-07-25 01:45:53 +00:00
GitHub Action
10471793b2 Added missing changes and modified dist assets. 2024-07-24 13:14:43 +00:00
renovate[bot]
28fd03b28d fix(deps): update dependency yaml to v2.5.0 2024-07-24 13:14:43 +00:00
renovate[bot]
4db04c76fa chore(deps): update dependency @types/node to v20.14.12 2024-07-23 20:12:24 +00:00
renovate[bot]
f79274f27b chore(deps): update typescript-eslint monorepo to v7.17.0 2024-07-22 19:43:16 +00:00
tj-actions[bot]
f1d2215d5d Upgraded to v44.5.6 (#2204)
Co-authored-by: jackton1 <17484350+jackton1@users.noreply.github.com>
2024-07-19 01:27:31 -06:00
Tonye Jack
6b2903bdce fix: remove unused code (#2202)
Co-authored-by: GitHub Action <action@github.com>
2024-07-18 19:39:13 +00:00
renovate[bot]
dc82617b24 chore(deps): update dependency ts-jest to v29.2.3 2024-07-18 17:55:38 +00:00
renovate[bot]
1797e9a1ea chore(deps): update dependency eslint-plugin-prettier to v5.2.1 2024-07-17 11:55:44 +00:00
renovate[bot]
56b5e13a32 fix(deps): update dependency @octokit/rest to v21.0.1 2024-07-17 00:35:57 +00:00
renovate[bot]
9e63ef55ed chore(deps): update dependency @types/node to v20.14.11 2024-07-16 20:24:00 +00:00
renovate[bot]
f1afcaced6 chore(deps): update dependency @types/lodash to v4.17.7 2024-07-16 03:48:13 +00:00
renovate[bot]
e42a3d1b0a chore(deps): update typescript-eslint monorepo to v7.16.1 2024-07-15 19:58:11 +00:00
renovate[bot]
f0eedff362 chore(deps): update dependency prettier to v3.3.3 2024-07-13 12:45:50 +00:00
renovate[bot]
f6d7b721fd chore(deps): update codacy/codacy-analysis-cli-action action to v4.4.5 2024-07-12 14:41:02 +00:00
renovate[bot]
6f59461624 chore(deps): update codacy/codacy-analysis-cli-action action to v4.4.4 2024-07-11 15:55:03 +00:00
renovate[bot]
443dcaf814 chore(deps): update codacy/codacy-analysis-cli-action action to v4.4.2 2024-07-11 13:46:28 +00:00
renovate[bot]
6f8dfa84e8 chore(deps): update dependency ts-jest to v29.2.2 2024-07-10 18:30:05 +00:00
renovate[bot]
df7dd40375 chore(deps): update dependency ts-jest to v29.2.1 2024-07-10 10:08:04 +00:00
renovate[bot]
07a5a99344 chore(deps): update actions/setup-node action to v4.0.3 2024-07-09 17:00:00 +00:00
renovate[bot]
02a0746337 chore(deps): update typescript-eslint monorepo to v7.16.0 2024-07-08 20:11:01 +00:00
renovate[bot]
75ed46d235 chore(deps): update dependency ts-jest to v29.2.0 2024-07-08 17:55:08 +00:00
renovate[bot]
c8c9e91b48 chore(deps): update dependency @types/node to v20.14.10 2024-07-05 21:40:00 +00:00
renovate[bot]
8ead8a4214 chore(deps): update dependency @typescript-eslint/eslint-plugin to v7.15.0 2024-07-02 15:10:35 +00:00
dependabot[bot]
0f83d09356 chore(deps-dev): bump @typescript-eslint/parser from 7.14.1 to 7.15.0 (#2181)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-02 08:58:55 -06:00
renovate[bot]
c3dcd3e758 chore(deps): update dependency @types/micromatch to v4.0.9 2024-06-29 14:14:44 +00:00
renovate[bot]
0e9a58eebf chore(deps): update actions/checkout action to v4 (#2174)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-28 19:13:31 -06:00
renovate[bot]
2295558b65 chore(deps): update actions/checkout action to v3 2024-06-28 14:17:31 +00:00
renovate[bot]
68447960ff chore(deps): update dependency @types/lodash to v4.17.6 2024-06-27 16:25:36 +00:00
renovate[bot]
00518ab39d chore(deps): update dependency @types/micromatch to v4.0.8 2024-06-26 12:15:24 +00:00
renovate[bot]
2c2260e690 chore(deps): update dependency @types/node to v20.14.9 2024-06-25 23:37:29 +00:00
tj-actions[bot]
9adb9156b8 Upgraded to v44.5.5 (#2168)
Co-authored-by: jackton1 <17484350+jackton1@users.noreply.github.com>
2024-06-25 13:42:08 +00:00
renovate[bot]
d1d479f03c chore(deps): update typescript-eslint monorepo to v7.14.1 2024-06-24 18:47:49 +00:00
Tonye Jack
cc733854b1 chore: remove debug lines (#2166)
Co-authored-by: GitHub Action <action@github.com>
2024-06-24 10:06:44 -06:00
tj-actions[bot]
0b99ecfd4e Upgraded to v44.5.4 (#2165)
Co-authored-by: jackton1 <17484350+jackton1@users.noreply.github.com>
2024-06-24 10:06:30 -06:00
Tonye Jack
cc3bbb0c52 fix: error using since_last_remote_commit with the first PR commit (#2163)
Co-authored-by: tj-actions[bot] <109116665+tj-actions-bot@users.noreply.github.com>
Co-authored-by: GitHub Action <action@github.com>
2024-06-23 01:03:16 -06:00
renovate[bot]
373db58d9d chore(deps): update dependency @types/node to v20.14.8 2024-06-22 08:54:44 +00:00
dependabot[bot]
9161a8dcde chore(deps-dev): bump @types/uuid from 9.0.8 to 10.0.0 (#2160)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-21 22:52:36 -06:00
tj-actions[bot]
e13fb92d45 Upgraded to v44.5.3 (#2154)
Co-authored-by: jackton1 <17484350+jackton1@users.noreply.github.com>
2024-06-21 21:41:51 -06:00
renovate[bot]
7891350b8e fix(deps): update dependency @octokit/rest to v21 (#2158)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: GitHub Action <action@github.com>
2024-06-21 21:41:32 -06:00
renovate[bot]
457e041909 chore(deps): update dependency @types/node to v20.14.7 2024-06-20 23:31:52 +00:00
renovate[bot]
eaf854ef0c chore(deps): update dependency @types/node to v20.14.6 2024-06-19 18:37:27 +00:00
renovate[bot]
681bf92506 chore(deps): update peter-evans/create-pull-request action to v6.1.0 2024-06-18 19:25:32 +00:00
renovate[bot]
3ec883ad31 chore(deps): update dependency @types/node to v20.14.5 2024-06-18 08:47:13 +00:00
renovate[bot]
e5740c1ffc chore(deps): update dependency @types/node to v20.14.4 2024-06-18 01:42:32 +00:00
renovate[bot]
bbe7f7b544 chore(deps): update dependency @types/node to v20.14.3 2024-06-17 22:19:15 +00:00
renovate[bot]
205913dc0c chore(deps): update typescript-eslint monorepo to v7.13.1 2024-06-17 19:02:52 +00:00
renovate[bot]
dd73690e2e chore(deps): lock file maintenance 2024-06-17 00:54:47 +00:00
renovate[bot]
c226cd45e5 chore(deps): update dependency ts-jest to v29.1.5 2024-06-16 16:54:00 +00:00
renovate[bot]
facb2785cd chore(deps): update dependency prettier to v3.3.2 2024-06-11 07:55:13 +00:00
Tonye Jack
4b558a92db chore: Update README.md (#2139) 2024-06-10 13:47:52 -06:00
renovate[bot]
5f68aa8f2d chore(deps): update typescript-eslint monorepo to v7.13.0 2024-06-10 18:14:05 +00:00
renovate[bot]
0da22a2fef chore(deps): lock file maintenance 2024-06-10 00:40:53 +00:00
GitHub Action
2972fe4d6b Added missing changes and modified dist assets. 2024-06-08 22:06:16 +00:00
renovate[bot]
57a81a39f3 fix(deps): update dependency yaml to v2.4.5 2024-06-08 22:06:16 +00:00
GitHub Action
1d8732f877 Added missing changes and modified dist assets. 2024-06-08 19:09:04 +00:00
renovate[bot]
3de07763cf fix(deps): update dependency yaml to v2.4.4 2024-06-08 19:09:04 +00:00
renovate[bot]
b53f3b80e1 chore(deps): update dependency @types/lodash to v4.17.5 2024-06-08 10:10:13 +00:00
renovate[bot]
4f8f7b39ce chore(deps): update dependency eslint-plugin-jest to v28.6.0 2024-06-06 23:24:37 +00:00
renovate[bot]
ff86e79932 chore(deps): update dependency prettier to v3.3.1 2024-06-05 10:43:54 +00:00
renovate[bot]
14c7f454e7 chore(deps): update dependency @types/node to v20.14.2 2024-06-05 10:31:58 +00:00
renovate[bot]
cda0f1d381 chore(deps): update dependency eslint-plugin-github to v5.0.1 2024-06-04 23:08:52 +00:00
renovate[bot]
d44c8e3205 chore(deps): update dependency @types/node to v20.14.1 2024-06-04 01:02:53 +00:00
renovate[bot]
6b3dabec4c chore(deps): update typescript-eslint monorepo to v7.12.0 2024-06-03 18:44:25 +00:00
renovate[bot]
bce8e36722 chore(deps): update dependency eslint-plugin-github to v5 (#2126)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-03 16:40:52 +00:00
renovate[bot]
b376795801 chore(deps): lock file maintenance 2024-06-03 12:39:52 +00:00
renovate[bot]
d41df78c17 chore(deps): update tj-actions/eslint-changed-files action to v25 (#2125)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-03 12:27:44 +00:00
Tonye Jack
4ae1154663 chore: downgrade tj-actions/eslint-changed-files pending move to eslint 9 (#2124)
Co-authored-by: GitHub Action <action@github.com>
2024-06-03 06:08:32 -06:00
renovate[bot]
60268df189 fix(deps): update dependency yaml to v2.4.3 (#2120)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-02 20:35:23 -06:00
renovate[bot]
f52993ba02 chore(deps): update dependency @types/node to v20.14.0 2024-06-02 22:31:32 +00:00
renovate[bot]
3b13fed1b0 chore(deps): update dependency prettier to v3.3.0 2024-06-01 19:41:52 +00:00
renovate[bot]
338ea071b0 chore(deps): update dependency @types/node to v20.12.14 2024-05-31 19:43:46 +00:00
tj-actions[bot]
25cb66210f Upgraded to v44.5.2 (#2116)
Co-authored-by: jackton1 <17484350+jackton1@users.noreply.github.com>
2024-05-30 05:22:17 +00:00
Tonye Jack
d6babd6899 fix: warning with fetch_missing_history_max_retries using REST API (#2114) 2024-05-30 05:05:34 +00:00
renovate[bot]
0a79e54e1f chore(deps): update dependency @types/node to v20.12.13 2024-05-29 19:47:23 +00:00
renovate[bot]
9d06a2a6a9 chore(deps): update dependency ts-jest to v29.1.4 2024-05-28 07:10:44 +00:00
renovate[bot]
7e8e88bd35 chore(deps): update typescript-eslint monorepo to v7.11.0 2024-05-27 22:39:58 +00:00
renovate[bot]
b510737b96 chore(deps): lock file maintenance 2024-05-27 15:52:00 +00:00
renovate[bot]
2e70979353 chore(deps): lock file maintenance 2024-05-27 02:35:45 +00:00
tj-actions[bot]
625929d27d Upgraded to v44.5.1 (#2108)
Co-authored-by: jackton1 <17484350+jackton1@users.noreply.github.com>
2024-05-24 04:56:51 +00:00
Tonye Jack
03334d095e fix: bug detecting previous tag when workflow is rerun (#2107)
Co-authored-by: GitHub Action <action@github.com>
2024-05-24 04:46:34 +00:00
GitHub Action
8a0655f075 Added missing changes and modified dist assets. 2024-05-22 11:55:42 +00:00
renovate[bot]
98e187efcd fix(deps): update dependency micromatch to v4.0.7 2024-05-22 11:55:42 +00:00
GitHub Action
96f65726ea Added missing changes and modified dist assets. 2024-05-21 17:28:01 +00:00
renovate[bot]
bf548e4af2 fix(deps): update dependency micromatch to v4.0.6 2024-05-21 17:28:01 +00:00
tj-actions[bot]
8b07fd3b11 Upgraded to v44.5.0 (#2101)
Co-authored-by: jackton1 <17484350+jackton1@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2024-05-21 09:59:35 -06:00
renovate[bot]
d195e6e7c2 chore(deps): update dependency ts-jest to v29.1.3 2024-05-21 04:54:11 +00:00
tj-actions[bot]
1754cd4b9e Updated README.md (#2099)
Co-authored-by: jackton1 <17484350+jackton1@users.noreply.github.com>
2024-05-20 22:21:52 -06:00
Tonye Jack
03c184259a feat: add support for providing patterns to match tags (#2098)
Co-authored-by: GitHub Action <action@github.com>
2024-05-21 04:17:52 +00:00
renovate[bot]
5f0139347a chore(deps): update typescript-eslint monorepo to v7.10.0 2024-05-20 22:14:31 +00:00
renovate[bot]
58a98867a7 chore(deps): update dependency @types/lodash to v4.17.4 2024-05-17 05:16:35 +00:00
renovate[bot]
9216b0cec2 chore(deps): update dependency @types/lodash to v4.17.3 2024-05-16 21:22:57 +00:00
renovate[bot]
0e3a6c3e99 chore(deps): update dependency @types/node to v20.12.12 2024-05-14 09:26:49 +00:00
renovate[bot]
e86678fe3a chore(deps): update typescript-eslint monorepo to v7.9.0 2024-05-13 20:27:08 +00:00
renovate[bot]
35d5a4d79f chore(deps): lock file maintenance 2024-05-13 01:27:13 +00:00
tj-actions[bot]
887f93673c Upgraded to v44.4.0 (#2086)
Co-authored-by: jackton1 <17484350+jackton1@users.noreply.github.com>
2024-05-12 20:23:48 +00:00
renovate[bot]
a29e8b5656 chore(deps): update dependency @types/node to v20.12.11 2024-05-08 13:08:12 +00:00
renovate[bot]
5a127050b2 chore(deps): update codacy/codacy-analysis-cli-action action to v4.4.1 2024-05-08 11:24:48 +00:00
renovate[bot]
581934340b chore(deps): update dependency @types/node to v20.12.10 2024-05-06 20:38:32 +00:00
renovate[bot]
5587afbef7 chore(deps): update dependency @types/node to v20.12.9 2024-05-06 16:06:25 +00:00
renovate[bot]
0f039f361b chore(deps): lock file maintenance 2024-05-06 00:55:37 +00:00
renovate[bot]
6d4230d4f0 chore(deps): update tj-actions/verify-changed-files action to v20 (#2079)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-04 17:01:00 +00:00
renovate[bot]
1711887607 chore(deps): update dependency @types/lodash to v4.17.1 2024-05-04 10:31:51 +00:00
GitHub Action
c393672835 Added missing changes and modified dist assets. 2024-05-03 21:36:59 +00:00
renovate[bot]
396e5a51d5 fix(deps): update dependency @octokit/rest to v20.1.1 2024-05-03 21:36:59 +00:00
renovate[bot]
47a2d62412 chore(deps): update dependency eslint-plugin-jest to v28.5.0 2024-05-03 21:28:22 +00:00
renovate[bot]
c73b12cc6d chore(deps): update dependency eslint-plugin-jest to v28.4.0 2024-05-03 03:20:34 +00:00
dependabot[bot]
41ce994be9 chore(deps-dev): bump @types/node from 20.12.7 to 20.12.8 (#2074)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-02 01:38:04 +00:00
renovate[bot]
192e174507 chore(deps): lock file maintenance 2024-05-01 13:48:00 +00:00
renovate[bot]
5e85e31a01 chore(deps): update typescript-eslint monorepo to v7.8.0 2024-04-29 19:04:36 +00:00
renovate[bot]
7871e848ad chore(deps): lock file maintenance 2024-04-29 01:36:07 +00:00
GitHub Action
15fa7fb955 Added missing changes and modified dist assets. 2024-04-28 10:28:51 +00:00
renovate[bot]
1c5b7dc5f4 fix(deps): update dependency yaml to v2.4.2 2024-04-28 10:28:51 +00:00
renovate[bot]
4765b9f775 chore(deps): update tj-actions/eslint-changed-files action to v25 (#2069)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-28 07:23:14 +00:00
tj-actions[bot]
0c82494d63 Updated README.md (#2068)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-27 10:01:05 +00:00
renovate[bot]
7d02310f6e chore(deps): update dependency eslint-plugin-jest to v28.3.0 2024-04-27 09:50:02 +00:00
renovate[bot]
0df48f8409 chore(deps): update peter-evans/create-pull-request action to v6.0.5 2024-04-25 10:44:21 +00:00
renovate[bot]
b76e23c88a chore(deps): update typescript-eslint monorepo to v7.7.1 2024-04-22 17:40:54 +00:00
renovate[bot]
549c203ec2 chore(deps): lock file maintenance 2024-04-22 01:39:30 +00:00
tj-actions[bot]
cee950d742 Updated README.md (#2061)
Co-authored-by: jackton1 <17484350+jackton1@users.noreply.github.com>
2024-04-20 04:26:05 +00:00
Tonye Jack
44ce9f4341 feat: reduce the default fetch_depth from 50 to 25 and increase fetch_missing_history_max_retries (#2060) 2024-04-20 04:15:07 +00:00
tj-actions[bot]
7b65c377b1 Updated README.md (#2059)
Co-authored-by: jackton1 <17484350+jackton1@users.noreply.github.com>
2024-04-18 15:18:18 -06:00
Tonye Jack
532b66aa5c Update action.yml 2024-04-18 15:09:11 -06:00
tj-actions[bot]
d9384bba72 Upgraded to v44.3.0 (#2058)
Co-authored-by: jackton1 <17484350+jackton1@users.noreply.github.com>
2024-04-18 15:07:59 -06:00
tj-actions[bot]
461ea4f9bf Updated README.md (#2057)
Co-authored-by: jackton1 <17484350+jackton1@users.noreply.github.com>
2024-04-18 15:04:48 -06:00
Tonye Jack
0874344d6e feat: add support for returning posix path separator on windows (#2056)
Co-authored-by: GitHub Action <action@github.com>
2024-04-18 15:03:38 -06:00
Tonye Jack
9f8300f8b4 fix: add a fallback value for the max number for retries to fetch missing history (#2055)
Co-authored-by: GitHub Action <action@github.com>
2024-04-18 19:12:36 +00:00
tj-actions[bot]
a06b9e80ae Upgraded to v44.2.0 (#2054)
Co-authored-by: jackton1 <17484350+jackton1@users.noreply.github.com>
2024-04-18 13:02:55 -06:00
tj-actions[bot]
4c5f5d698f Updated README.md (#2053)
Co-authored-by: jackton1 <17484350+jackton1@users.noreply.github.com>
2024-04-18 12:52:38 -06:00
Tonye Jack
07c64e5618 feat: add support for specifying the max number for retries to fetch missing history (#2052)
Co-authored-by: GitHub Action <action@github.com>
2024-04-18 12:45:07 -06:00
tj-actions[bot]
5bd333239b Upgraded to v44.1.0 (#2050)
Co-authored-by: jackton1 <17484350+jackton1@users.noreply.github.com>
2024-04-17 16:40:08 +00:00
tj-actions[bot]
831e892562 Updated README.md (#2049)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2024-04-17 10:26:15 -06:00
Tonye Jack
e052d30e1c feat: add option to exclude submodules when detecting changes (#2047)
Co-authored-by: GitHub Action <action@github.com>
2024-04-17 16:24:26 +00:00
renovate[bot]
23a449039c chore(deps): update peter-evans/create-pull-request action to v6.0.4 2024-04-17 14:08:27 +00:00
renovate[bot]
60e2739e15 chore(deps): update typescript-eslint monorepo to v7.7.0 2024-04-15 19:13:52 +00:00
renovate[bot]
0f319d7425 chore(deps): lock file maintenance 2024-04-15 03:20:08 +00:00
GitHub Action
d477ae513d Added missing changes and modified dist assets. 2024-04-15 02:12:15 +00:00
renovate[bot]
5891cbdfd5 chore(deps): lock file maintenance 2024-04-15 02:12:15 +00:00
renovate[bot]
c9eaa5c000 chore(deps): update dependency @types/micromatch to v4.0.7 2024-04-13 20:46:50 +00:00
renovate[bot]
fd91508dbb chore(deps): update peter-evans/create-pull-request action to v6.0.3 2024-04-12 11:18:54 +00:00
renovate[bot]
e8a7e82269 chore(deps): update dependency typescript to v5.4.5 2024-04-10 15:33:05 +00:00
tj-actions[bot]
159b05372c Upgraded to v44.0.1 (#2037)
Co-authored-by: jackton1 <17484350+jackton1@users.noreply.github.com>
2024-04-09 23:54:32 +00:00
renovate[bot]
635f118699 chore(deps): update dependency @types/node to v20.12.7 2024-04-09 22:45:21 +00:00
renovate[bot]
634b61511e chore(deps): update dependency @types/node to v20.12.6 2024-04-09 07:28:13 +00:00
renovate[bot]
77fcf43160 chore(deps): update typescript-eslint monorepo to v7.6.0 2024-04-08 19:14:43 +00:00
GitHub Action
5f084a52a4 Added missing changes and modified dist assets. 2024-04-08 14:42:53 +00:00
renovate[bot]
ff2cb1b4f2 chore(deps): lock file maintenance 2024-04-08 14:42:53 +00:00
renovate[bot]
5d5da31340 chore(deps): update dependency eslint-plugin-jest to v28.2.0 2024-04-07 02:26:15 +00:00
renovate[bot]
29bc0d3fd9 chore(deps): update dependency eslint-plugin-jest to v28.1.1 2024-04-06 23:12:23 +00:00
renovate[bot]
c9f9d5784e chore(deps): update dependency eslint-plugin-jest to v28 (#2030)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-06 10:04:57 +00:00
renovate[bot]
a4fba0109c chore(deps): update dependency @types/node to v20.12.5 2024-04-05 23:24:24 +00:00
dependabot[bot]
8a6546164a chore(deps): bump undici from 5.28.3 to 5.28.4 (#2026)
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>
Co-authored-by: GitHub Action <action@github.com>
2024-04-04 18:55:07 +00:00
renovate[bot]
bad2eb6859 chore(deps): update dependency typescript to v5.4.4 2024-04-04 18:45:28 +00:00
renovate[bot]
b2dbd4264a chore(deps): update dependency @types/node to v20.12.4 2024-04-04 00:49:09 +00:00
renovate[bot]
57d40e662d fix(deps): update dependency @octokit/rest to v20.1.0 2024-04-03 20:00:38 +00:00
renovate[bot]
185549c022 chore(deps): update dependency @types/node to v20.12.3 2024-04-02 22:09:40 +00:00
renovate[bot]
f853fd0592 chore(deps): update typescript-eslint monorepo to v7.5.0 2024-04-02 00:11:13 +00:00
renovate[bot]
cd3c6e6bbd chore(deps): lock file maintenance 2024-04-01 00:51:33 +00:00
renovate[bot]
e5ce44a301 chore(deps): update dependency @types/node to v20.12.2 2024-03-30 07:12:07 +00:00
renovate[bot]
ccdcd17ffd chore(deps): update tj-actions/eslint-changed-files action to v24 (#2019)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-29 14:37:20 +00:00
tj-actions[bot]
e4b8dafc5d Upgraded to v44 (#2017)
Co-authored-by: jackton1 <17484350+jackton1@users.noreply.github.com>
2024-03-26 20:33:57 -06:00
tj-actions[bot]
2d756ea4c5 Updated README.md (#2016)
Co-authored-by: jackton1 <17484350+jackton1@users.noreply.github.com>
2024-03-26 19:52:24 -06:00
tonyejack1
ce497c39e9 chore: update description of outputs removing asterisks (#2015) 2024-03-26 19:50:35 -06:00
Tonye Jack
2d21bbb405 Update README.md 2024-03-26 19:32:02 -06:00
Tonye Jack
90941b398f remove: unused code (#2014) 2024-03-26 22:49:39 +00:00
tj-actions[bot]
2ca8dc42f6 Updated README.md (#2013)
Co-authored-by: jackton1 <17484350+jackton1@users.noreply.github.com>
2024-03-26 16:16:41 -06:00
tonyejack1
ee096d679e chore: update description of other_deleted_files output (#2008)
Co-authored-by: Tonye Jack <jtonye@ymail.com>
2024-03-26 16:15:39 -06:00
tonyejack1
4621617d4b Update README.md 2024-03-26 13:31:35 -06:00
Tonye Jack
4bbd49b998 fix: ensure the fork remote doesn't exists before creating it (#2012)
Co-authored-by: GitHub Action <action@github.com>
2024-03-26 19:12:21 +00:00
Tonye Jack
c6557ed000 Update README.md 2024-03-26 12:50:59 -06:00
Tonye Jack
f0e7702ccc fix: update previos sha for forks (#2011)
Co-authored-by: GitHub Action <action@github.com>
2024-03-26 18:46:29 +00:00
Tonye Jack
6354e6c542 fix: update to add the fork remote (#2010) 2024-03-26 18:28:16 +00:00
Tonye Jack
117616472f fix: check for setting remote urls for forks (#2009) 2024-03-26 12:10:44 -06:00
Tonye Jack
4ff79362e5 fix: bug with prs from forks returning incorrect set of changed files (#2007)
Co-authored-by: GitHub Action <action@github.com>
2024-03-26 11:47:25 -06:00
Tonye Jack
0713a11242 Update README.md 2024-03-26 11:42:41 -06:00
renovate[bot]
064742427d chore(deps): update typescript-eslint monorepo to v7.4.0 2024-03-25 19:10:31 +00:00
renovate[bot]
efe5e6c7a4 chore(deps): lock file maintenance 2024-03-25 01:33:42 +00:00
tj-actions[bot]
01e9662a12 Upgraded to v43.0.1 (#2004)
Co-authored-by: jackton1 <17484350+jackton1@users.noreply.github.com>
2024-03-21 00:42:37 +00:00
renovate[bot]
20576b4b9e chore(deps): update dependency typescript to v5.4.3 2024-03-20 21:58:07 +00:00
Tonye Jack
077b23f6a6 fix: remove warning with detecting the local git repository when using Github's REST API (#2002)
Co-authored-by: GitHub Action <action@github.com>
2024-03-20 19:20:51 +00:00
Tonye Jack
02768050b1 chore: update inputs.ts adding comment about fetch_depth (#2000) 2024-03-20 14:29:59 +00:00
renovate[bot]
427adf47f0 chore(deps): update dependency @types/node to v20.11.30 2024-03-19 13:28:54 +00:00
dependabot[bot]
5c6aa49478 Bump @typescript-eslint/eslint-plugin from 7.3.0 to 7.3.1 (#1995)
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>
2024-03-18 22:27:06 -06:00
renovate[bot]
aa0b62a2d0 chore(deps): update dependency @typescript-eslint/eslint-plugin to v7.3.1 2024-03-19 02:09:15 +00:00
dependabot[bot]
0320702dd5 Bump @typescript-eslint/parser from 7.3.0 to 7.3.1 (#1996)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-19 01:47:18 +00:00
renovate[bot]
38903688b4 chore(deps): update dependency @types/node to v20.11.29 2024-03-18 21:43:53 +00:00
renovate[bot]
98a74d2cd6 chore(deps): update typescript-eslint monorepo to v7.3.0 2024-03-18 17:46:43 +00:00
renovate[bot]
068000d9c6 chore(deps): lock file maintenance 2024-03-18 02:16:34 +00:00
renovate[bot]
490ac3999e chore(deps): update dependency @types/node to v20.11.28 2024-03-15 10:23:14 +00:00
Tonye Jack
2859a60726 Update README.md 2024-03-13 21:43:22 -06:00
tj-actions[bot]
d03038e4e4 Upgraded to v43 (#1990)
Co-authored-by: jackton1 <17484350+jackton1@users.noreply.github.com>
2024-03-13 17:06:28 -06:00
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
33 changed files with 19471 additions and 5172 deletions

View File

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

View File

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

View File

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

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

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

View File

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

View File

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

View File

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

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

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

View File

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

View File

@@ -1,5 +1,8 @@
name: CI
permissions:
contents: read
on:
push:
branches:
@@ -31,6 +34,9 @@ jobs:
runs-on: ubuntu-latest
outputs:
files_changed: ${{ steps.changed_files.outputs.files_changed }}
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@v4
with:
@@ -39,7 +45,7 @@ jobs:
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Use Node.js 20.x
uses: actions/setup-node@v4.0.1
uses: actions/setup-node@v4.0.3
with:
cache: 'yarn'
node-version: '20.x'
@@ -54,7 +60,7 @@ jobs:
yarn install
- name: Run eslint on changed files
uses: tj-actions/eslint-changed-files@v21
uses: tj-actions/eslint-changed-files@v25
if: github.event_name == 'pull_request'
with:
token: ${{ secrets.PAT_TOKEN }}
@@ -66,7 +72,7 @@ jobs:
yarn all
- name: Verify Changed files
uses: tj-actions/verify-changed-files@v16
uses: tj-actions/verify-changed-files@v20
id: changed_files
with:
files: |
@@ -107,6 +113,8 @@ jobs:
runs-on: ubuntu-latest
needs: build
if: needs.build.outputs.files_changed != 'true'
permissions:
contents: read
steps:
- name: Checkout into dir1
uses: actions/checkout@v4
@@ -181,7 +189,8 @@ jobs:
needs: build
runs-on: ubuntu-latest
if: github.event_name == 'push' && needs.build.outputs.files_changed != 'true'
permissions:
contents: read
steps:
- name: Checkout branch
uses: actions/checkout@v4
@@ -239,6 +248,8 @@ jobs:
runs-on: ubuntu-latest
needs: build
if: needs.build.outputs.files_changed != 'true'
permissions:
contents: read
steps:
- name: Checkout branch
@@ -281,6 +292,8 @@ jobs:
github.event_name == 'push' ||
github.event_name == 'pull_request'
) && needs.build.outputs.files_changed != 'true'
permissions:
contents: read
steps:
- name: Checkout branch
@@ -311,6 +324,8 @@ jobs:
runs-on: ubuntu-latest
needs: build
if: needs.build.outputs.files_changed != 'true'
permissions:
contents: read
strategy:
fail-fast: false
@@ -350,6 +365,8 @@ jobs:
runs-on: ubuntu-latest
needs: build
if: github.event_name != 'push' && needs.build.outputs.files_changed != 'true'
permissions:
contents: read
steps:
- name: Checkout branch
@@ -377,6 +394,8 @@ jobs:
runs-on: ubuntu-latest
needs: build
if: github.event_name != 'push' && needs.build.outputs.files_changed != 'true'
permissions:
contents: read
strategy:
fail-fast: false
max-parallel: 4
@@ -411,7 +430,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
@@ -465,7 +485,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
@@ -546,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
@@ -589,11 +682,34 @@ jobs:
echo "${{ toJSON(steps.changed-files.outputs) }}"
shell:
bash
- name: Run changed-files excluding submodule
id: changed-files-exclude-submodule
uses: ./
with:
base_sha: "85bd869"
sha: "adde7bb"
fetch_depth: 60000
exclude_submodules: true
- name: Verify no added files
if: steps.changed-files-exclude-submodule.outputs.added_files != ''
run: |
echo "Expected: ('') got ${{ steps.changed-files-exclude-submodule.outputs.added_files }}"
exit 1
- name: Show output
run: |
echo "${{ toJSON(steps.changed-files-exclude-submodule.outputs) }}"
shell:
bash
test-yaml:
name: Test changed-files with yaml
runs-on: ubuntu-latest
needs: build
if: needs.build.outputs.files_changed != 'true'
permissions:
contents: read
strategy:
fail-fast: false
max-parallel: 4
@@ -669,6 +785,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
@@ -859,6 +977,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
@@ -889,14 +1009,19 @@ jobs:
bash
test-dir-names-deleted-files-include-only-deleted-dirs-directory:
name: Test dir names deleted files include only deleted dirs
runs-on: ubuntu-latest
runs-on: ${{ matrix.platform }}
needs: build
strategy:
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
if: needs.build.outputs.files_changed != 'true'
permissions:
contents: read
steps:
- name: Checkout branch
uses: actions/checkout@v4
with:
ref: cd1e384723e4d1a184568182ac2b27c53ebf017f
ref: ${{ github.event.pull_request.head.sha }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
submodules: true
fetch-depth: 2
@@ -908,6 +1033,7 @@ jobs:
sha: cd1e384723e4d1a184568182ac2b27c53ebf017f
dir_names: true
dir_names_deleted_files_include_only_deleted_dirs: true
fetch_depth: 60000
- name: Show output
run: |
echo '${{ toJSON(steps.changed-files-dir-names-deleted-files-include-only-deleted-dirs-directory.outputs) }}'
@@ -927,12 +1053,43 @@ jobs:
exit 1
shell:
bash
- name: Run changed-files with dir_names and dir_names_deleted_files_include_only_deleted_dirs with the test directory deleted returns posix path separator
id: changed-files-dir-names-deleted-files-include-only-deleted-dirs-directory-posix-path-separator
uses: ./
with:
base_sha: a52f8621d26d5d9f54b80f74bda2d9eedff94693
sha: cd1e384723e4d1a184568182ac2b27c53ebf017f
dir_names: true
dir_names_deleted_files_include_only_deleted_dirs: true
use_posix_path_separator: true
fetch_depth: 60000
- name: Show output
run: |
echo '${{ toJSON(steps.changed-files-dir-names-deleted-files-include-only-deleted-dirs-directory-posix-path-separator.outputs) }}'
shell:
bash
- name: Check deleted_files output on non windows platform
if: steps.changed-files-dir-names-deleted-files-include-only-deleted-dirs-directory-posix-path-separator.outputs.deleted_files != 'test/test3' && runner.os != 'Windows'
run: |
echo "Invalid output: Expected (test/test3) got (${{ steps.changed-files-dir-names-deleted-files-include-only-deleted-dirs-directory-posix-path-separator.outputs.deleted_files }})"
exit 1
shell:
bash
- name: Check deleted_files output on windows platform
if: "!contains(steps.changed-files-dir-names-deleted-files-include-only-deleted-dirs-directory-posix-path-separator.outputs.deleted_files, 'test/test3') && runner.os == 'Windows'"
run: |
echo "Invalid output: Expected (test/test3) got (${{ steps.changed-files-dir-names-deleted-files-include-only-deleted-dirs-directory-posix-path-separator.outputs.deleted_files }})"
exit 1
shell:
bash
test-since-last-remote-commit:
name: Test changed-files since last remote commit
runs-on: ubuntu-latest
needs: build
if: needs.build.outputs.files_changed != 'true'
permissions:
contents: read
strategy:
fail-fast: false
max-parallel: 4
@@ -960,7 +1117,7 @@ jobs:
with:
since_last_remote_commit: true
- name: Verify failed
- name: Verify succeeded pull_request(closed)
if: steps.changed-files-since-last-remote-commit.outcome != 'failure' && matrix.fetch-depth == 1 && github.event.action == 'closed' && github.event_name == 'pull_request'
run: |
echo "Expected: (failure) got ${{ steps.changed-files-since-last-remote-commit.outcome }}"
@@ -983,6 +1140,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
@@ -1013,7 +1172,7 @@ jobs:
echo '${{ toJSON(steps.changed-files.outputs) }}'
shell:
bash
- name: Run changed-files with dir name
- name: Run changed-files with dir name pattern
id: changed-files-dir-name
uses: ./
with:

View File

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

View File

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

1280
HISTORY.md

File diff suppressed because it is too large Load Diff

506
README.md

File diff suppressed because it is too large Load Diff

View File

@@ -127,21 +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."
required: false
default: "50"
default: "25"
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.
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:
@@ -199,6 +203,10 @@ inputs:
description: "Github API URL."
required: false
default: ${{ github.api_url }}
use_rest_api:
description: "Force the use of Github's REST API even when a local copy of the repository exists"
required: false
default: "false"
fail_on_initial_diff_error:
description: "Fail when the initial diff fails."
required: false
@@ -211,6 +219,31 @@ inputs:
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"
exclude_submodules:
description: "Exclude changes to submodules."
required: false
default: "false"
fetch_missing_history_max_retries:
description: "Maximum number of retries to fetch missing history."
required: false
default: "20"
use_posix_path_separator:
description: "Use POSIX path separator `/` for output file paths on Windows."
required: false
default: "false"
tags_pattern:
description: "Tags pattern to include."
required: false
default: "*"
tags_ignore_pattern:
description: "Tags pattern to ignore."
required: false
default: ""
outputs:
added_files:
@@ -250,45 +283,45 @@ outputs:
unknown_files_count:
description: "Returns the number of `unknown_files`"
all_changed_and_modified_files:
description: "Returns all changed and modified files i.e. *a combination of (ACMRDTUX)*"
description: "Returns all changed and modified files i.e. a combination of (ACMRDTUX)"
all_changed_and_modified_files_count:
description: "Returns the number of `all_changed_and_modified_files`"
all_changed_files:
description: "Returns all changed files i.e. *a combination of all added, copied, modified and renamed files (ACMR)*"
description: "Returns all changed files i.e. a combination of all added, copied, modified and renamed files (ACMR)"
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)*."
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:
description: "Returns the number of `other_changed_files`"
all_modified_files:
description: "Returns all changed files i.e. *a combination of all added, copied, modified, renamed and deleted files (ACMRD)*."
description: "Returns all changed files i.e. a combination of all added, copied, modified, renamed and deleted files (ACMRD)."
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)*"
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)*"
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:
description: "Returns the number of `other_deleted_files`"
modified_keys:
description: "Returns all modified YAML keys when the `files_yaml` input is used. i.e. *key that contains any path that has either been added, copied, modified, and deleted (ACMRD)*"
description: "Returns all modified YAML keys when the `files_yaml` input is used. i.e. key that contains any path that has either been added, copied, modified, and deleted (ACMRD)"
changed_keys:
description: "Returns all changed YAML keys when the `files_yaml` input is used. i.e. *key that contains any path that has either been added, copied, modified, and renamed (ACMR)*"
description: "Returns all changed YAML keys when the `files_yaml` input is used. i.e. key that contains any path that has either been added, copied, modified, and renamed (ACMR)"
runs:
using: 'node20'

13452
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

5251
dist/licenses.txt generated vendored

File diff suppressed because it is too large Load Diff

View File

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

View File

@@ -1,6 +1,5 @@
const path = require('path')
process.env.TESTING = "1"
process.env.GITHUB_WORKSPACE = path.join(
path.resolve(__dirname, '..'), '.'
)

View File

@@ -1,6 +1,6 @@
{
"name": "@tj-actions/changed-files",
"version": "40.2.2",
"version": "44.5.6",
"description": "Github action to retrieve all (added, copied, modified, deleted, renamed, type changed, unmerged, unknown) files and directories.",
"main": "lib/main.js",
"publishConfig": {
@@ -14,6 +14,7 @@
"lint:fix": "eslint --fix src/*.ts src/**/*.ts",
"package": "ncc build lib/main.js --source-map --license licenses.txt",
"test": "jest --coverage",
"update-snapshot": "jest -u",
"all": "yarn build && yarn format && yarn lint && yarn package && yarn test"
},
"repository": {
@@ -35,7 +36,8 @@
"@actions/core": "^1.10.0",
"@actions/exec": "^1.1.1",
"@actions/github": "^6.0.0",
"@octokit/rest": "^20.0.1",
"@octokit/rest": "^21.0.0",
"@stdlib/utils-convert-path": "^0.2.1",
"lodash": "^4.17.21",
"micromatch": "^4.0.5",
"yaml": "^2.3.1"
@@ -44,16 +46,16 @@
"@types/jest": "^29.5.2",
"@types/lodash": "^4.14.195",
"@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",
"@types/node": "^22.0.0",
"@types/uuid": "^10.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",
"eslint-plugin-jest": "^27.2.2",
"eslint-plugin-prettier": "^5.0.0-alpha.2",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-github": "^5.0.0",
"eslint-plugin-jest": "^28.0.0",
"eslint-plugin-prettier": "^5.0.0-alpha.2",
"jest": "^29.5.0",
"prettier": "^3.0.0",
"ts-jest": "^29.1.0",

View File

@@ -0,0 +1,373 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`getInputs should correctly parse boolean inputs 1`] = `
{
"apiUrl": "",
"baseSha": "",
"diffRelative": "false",
"dirNames": "false",
"dirNamesDeletedFilesIncludeOnlyDeletedDirs": "false",
"dirNamesExcludeCurrentDir": "false",
"dirNamesIncludeFiles": "",
"dirNamesIncludeFilesSeparator": "",
"escapeJson": false,
"excludeSubmodules": "false",
"failOnInitialDiffError": "false",
"failOnSubmoduleDiffError": "false",
"fetchAdditionalSubmoduleHistory": "false",
"fetchMissingHistoryMaxRetries": 20,
"files": "",
"filesFromSourceFile": "",
"filesFromSourceFileSeparator": "",
"filesIgnore": "",
"filesIgnoreFromSourceFile": "",
"filesIgnoreFromSourceFileSeparator": "",
"filesIgnoreSeparator": "",
"filesIgnoreYaml": "",
"filesIgnoreYamlFromSourceFile": "",
"filesIgnoreYamlFromSourceFileSeparator": "",
"filesSeparator": "",
"filesYaml": "",
"filesYamlFromSourceFile": "",
"filesYamlFromSourceFileSeparator": "",
"includeAllOldNewRenamedFiles": "false",
"json": true,
"negationPatternsFirst": "false",
"oldNewFilesSeparator": " ",
"oldNewSeparator": ",",
"outputDir": "",
"outputRenamedFilesAsDeletedAndAdded": "false",
"path": ".",
"quotepath": "false",
"recoverDeletedFiles": "false",
"recoverDeletedFilesToDestination": "",
"recoverFiles": "",
"recoverFilesIgnore": "",
"recoverFilesIgnoreSeparator": "
",
"recoverFilesSeparator": "
",
"safeOutput": "false",
"separator": "",
"sha": "",
"since": "",
"sinceLastRemoteCommit": "false",
"skipInitialFetch": "true",
"tagsIgnorePattern": "",
"tagsPattern": "*",
"token": "",
"until": "",
"usePosixPathSeparator": "false",
"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,
"excludeSubmodules": 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,
"tagsIgnorePattern": "",
"tagsPattern": "",
"token": "",
"until": "",
"usePosixPathSeparator": false,
"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,
"excludeSubmodules": 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,
"tagsIgnorePattern": "",
"tagsPattern": "",
"token": "token",
"until": "",
"usePosixPathSeparator": false,
"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,
"excludeSubmodules": 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,
"tagsIgnorePattern": "",
"tagsPattern": "",
"token": "",
"until": "",
"usePosixPathSeparator": false,
"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,
"excludeSubmodules": 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,
"tagsIgnorePattern": "",
"tagsPattern": "",
"token": "",
"until": "",
"usePosixPathSeparator": false,
"useRestApi": false,
"writeOutputFiles": false,
}
`;
exports[`getInputs should return default values when no inputs are provided 1`] = `
{
"apiUrl": "",
"baseSha": "",
"diffRelative": true,
"dirNames": false,
"dirNamesDeletedFilesIncludeOnlyDeletedDirs": false,
"dirNamesExcludeCurrentDir": false,
"dirNamesIncludeFiles": "",
"dirNamesIncludeFilesSeparator": "",
"escapeJson": false,
"excludeSubmodules": false,
"failOnInitialDiffError": false,
"failOnSubmoduleDiffError": false,
"fetchAdditionalSubmoduleHistory": false,
"fetchMissingHistoryMaxRetries": 20,
"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,
"tagsIgnorePattern": "",
"tagsPattern": "*",
"token": "",
"until": "",
"usePosixPathSeparator": false,
"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.getInput 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.getInput 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,9 +1,14 @@
import * as core from '@actions/core'
import * as exec from '@actions/exec'
import {ChangeTypeEnum} from '../changedFiles'
import {Inputs} from '../inputs'
import {
getDirname,
getDirnameMaxDepth,
getFilteredChangedFiles,
normalizeSeparators
getPreviousGitTag,
normalizeSeparators,
warnUnsupportedRESTAPIInputs
} from '../utils'
const originalPlatform = process.platform
@@ -575,4 +580,173 @@ 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,
excludeSubmodules: false,
fetchMissingHistoryMaxRetries: 20,
usePosixPathSeparator: false,
tagsPattern: '*',
tagsIgnorePattern: ''
}
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)
})
})
describe('getPreviousGitTag', () => {
// Function returns the second-latest tag and its SHA
it('should return the second latest tag and its SHA when multiple tags are present', async () => {
const result = await getPreviousGitTag({
cwd: '.',
tagsPattern: '*',
tagsIgnorePattern: '',
currentBranch: 'v1.0.1'
})
expect(result).toEqual({
tag: 'v1.0.0',
sha: 'f0751de6af436d4e79016e2041cf6400e0833653'
})
})
// Tags are filtered by a specified pattern when 'tagsPattern' is provided
it('should filter tags by the specified pattern', async () => {
const result = await getPreviousGitTag({
cwd: '.',
tagsPattern: 'v1.*',
tagsIgnorePattern: '',
currentBranch: 'v1.0.1'
})
expect(result).toEqual({
tag: 'v1.0.0',
sha: 'f0751de6af436d4e79016e2041cf6400e0833653'
})
})
// Tags are excluded by a specified ignore pattern when 'tagsIgnorePattern' is provided
it('should exclude tags by the specified ignore pattern', async () => {
const result = await getPreviousGitTag({
cwd: '.',
tagsPattern: '*',
tagsIgnorePattern: 'v0.*.*',
currentBranch: 'v1.0.1'
})
expect(result).toEqual({
tag: 'v1.0.0',
sha: 'f0751de6af436d4e79016e2041cf6400e0833653'
})
})
// No tags are available in the repository
it('should return empty values when no tags are available in the repository', async () => {
jest.spyOn(exec, 'getExecOutput').mockResolvedValueOnce({
stdout: '',
stderr: '',
exitCode: 0
})
const result = await getPreviousGitTag({
cwd: '.',
tagsPattern: '*',
tagsIgnorePattern: '',
currentBranch: ''
})
expect(result).toEqual({tag: '', sha: ''})
})
// Only one tag is available, making it impossible to find a previous tag
it('should return empty values when only one tag is available', async () => {
jest.spyOn(exec, 'getExecOutput').mockResolvedValueOnce({
stdout:
'v1.0.1|f0751de6af436d4e79016e2041cf6400e0833653|2021-01-01T00:00:00Z',
stderr: '',
exitCode: 0
})
const result = await getPreviousGitTag({
cwd: '.',
tagsPattern: '*',
tagsIgnorePattern: '',
currentBranch: 'v1.0.1'
})
expect(result).toEqual({tag: '', sha: ''})
})
// Git commands fail and throw errors
it('should throw an error when git commands fail', async () => {
jest
.spyOn(exec, 'getExecOutput')
.mockRejectedValue(new Error('git command failed'))
await expect(
getPreviousGitTag({
cwd: '.',
tagsPattern: '*',
tagsIgnorePattern: '',
currentBranch: 'v1.0.1'
})
).rejects.toThrow('git command failed')
})
})
})

View File

@@ -2,6 +2,7 @@ import * as core from '@actions/core'
import * as github from '@actions/github'
import type {RestEndpointMethodTypes} from '@octokit/rest'
import flatten from 'lodash/flatten'
import convertPath from '@stdlib/utils-convert-path'
import mm from 'micromatch'
import * as path from 'path'
import {setOutputsAndGetModifiedAndChangedFilesStatus} from './changedFilesOutput'
@@ -121,13 +122,13 @@ export const processChangedFiles = async ({
export const getRenamedFiles = async ({
inputs,
workingDirectory,
hasSubmodule,
diffSubmodule,
diffResult,
submodulePaths
}: {
inputs: Inputs
workingDirectory: string
hasSubmodule: boolean
diffSubmodule: boolean
diffResult: DiffResult
submodulePaths: string[]
}): Promise<{paths: string; count: string}> => {
@@ -139,7 +140,7 @@ export const getRenamedFiles = async ({
oldNewSeparator: inputs.oldNewSeparator
})
if (hasSubmodule) {
if (diffSubmodule) {
for (const submodulePath of submodulePaths) {
const submoduleShaResult = await gitSubmoduleDiffSHA({
cwd: workingDirectory,
@@ -166,7 +167,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)
@@ -217,20 +218,20 @@ export type ChangedFiles = {
export const getAllDiffFiles = async ({
workingDirectory,
hasSubmodule,
diffSubmodule,
diffResult,
submodulePaths,
outputRenamedFilesAsDeletedAndAdded,
fetchSubmoduleHistory,
fetchAdditionalSubmoduleHistory,
failOnInitialDiffError,
failOnSubmoduleDiffError
}: {
workingDirectory: string
hasSubmodule: boolean
diffSubmodule: boolean
diffResult: DiffResult
submodulePaths: string[]
outputRenamedFilesAsDeletedAndAdded: boolean
fetchSubmoduleHistory: boolean
fetchAdditionalSubmoduleHistory: boolean
failOnInitialDiffError: boolean
failOnSubmoduleDiffError: boolean
}): Promise<ChangedFiles> => {
@@ -243,7 +244,7 @@ export const getAllDiffFiles = async ({
failOnInitialDiffError
})
if (hasSubmodule) {
if (diffSubmodule) {
for (const submodulePath of submodulePaths) {
const submoduleShaResult = await gitSubmoduleDiffSHA({
cwd: workingDirectory,
@@ -270,7 +271,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)
@@ -355,7 +356,11 @@ function* getChangeTypeFilesGenerator({
filePaths,
dirNamesIncludeFilePatterns
})) {
yield filePath
if (isWindows() && inputs.usePosixPathSeparator) {
yield convertPath(filePath, 'mixed')
} else {
yield filePath
}
}
}
}
@@ -402,7 +407,11 @@ function* getAllChangeTypeFilesGenerator({
filePaths,
dirNamesIncludeFilePatterns
})) {
yield filePath
if (isWindows() && inputs.usePosixPathSeparator) {
yield convertPath(filePath, 'mixed')
} else {
yield filePath
}
}
}

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

@@ -86,15 +86,27 @@ export interface DiffResult {
initialCommit?: boolean
}
export const getSHAForNonPullRequestEvent = async (
inputs: Inputs,
env: Env,
workingDirectory: string,
isShallow: boolean,
hasSubmodule: boolean,
gitFetchExtraArgs: string[],
interface SHAForNonPullRequestEvent {
inputs: Inputs
env: Env
workingDirectory: string
isShallow: boolean
diffSubmodule: boolean
gitFetchExtraArgs: string[]
isTag: boolean
): Promise<DiffResult> => {
remoteName: string
}
export const getSHAForNonPullRequestEvent = async ({
inputs,
env,
workingDirectory,
isShallow,
diffSubmodule,
gitFetchExtraArgs,
isTag,
remoteName
}: SHAForNonPullRequestEvent): Promise<DiffResult> => {
let targetBranch = env.GITHUB_REF_NAME
let currentBranch = targetBranch
let initialCommit = false
@@ -122,8 +134,8 @@ export const getSHAForNonPullRequestEvent = async (
'-u',
'--progress',
`--deepen=${inputs.fetchDepth}`,
'origin',
`+refs/heads/${sourceBranch}:refs/remotes/origin/${sourceBranch}`
remoteName,
`+refs/heads/${sourceBranch}:refs/remotes/${remoteName}/${sourceBranch}`
]
})
} else {
@@ -134,13 +146,13 @@ export const getSHAForNonPullRequestEvent = async (
'-u',
'--progress',
`--deepen=${inputs.fetchDepth}`,
'origin',
`+refs/heads/${targetBranch}:refs/remotes/origin/${targetBranch}`
remoteName,
`+refs/heads/${targetBranch}:refs/remotes/${remoteName}/${targetBranch}`
]
})
}
if (hasSubmodule) {
if (diffSubmodule) {
await gitFetchSubmodules({
cwd: workingDirectory,
args: [
@@ -152,7 +164,7 @@ export const getSHAForNonPullRequestEvent = async (
})
}
} else {
if (hasSubmodule && inputs.fetchSubmoduleHistory) {
if (diffSubmodule && inputs.fetchAdditionalSubmoduleHistory) {
await gitFetchSubmodules({
cwd: workingDirectory,
args: [
@@ -228,7 +240,12 @@ export const getSHAForNonPullRequestEvent = async (
}
} else if (isTag) {
core.debug('Getting previous SHA for tag...')
const {sha, tag} = await getPreviousGitTag({cwd: workingDirectory})
const {sha, tag} = await getPreviousGitTag({
cwd: workingDirectory,
tagsPattern: inputs.tagsPattern,
tagsIgnorePattern: inputs.tagsIgnorePattern,
currentBranch
})
previousSha = sha
targetBranch = tag
} else {
@@ -307,14 +324,23 @@ export const getSHAForNonPullRequestEvent = async (
}
}
export const getSHAForPullRequestEvent = async (
inputs: Inputs,
env: Env,
workingDirectory: string,
isShallow: boolean,
hasSubmodule: boolean,
interface SHAForPullRequestEvent {
inputs: Inputs
workingDirectory: string
isShallow: boolean
diffSubmodule: boolean
gitFetchExtraArgs: string[]
): Promise<DiffResult> => {
remoteName: string
}
export const getSHAForPullRequestEvent = async ({
inputs,
workingDirectory,
isShallow,
diffSubmodule,
gitFetchExtraArgs,
remoteName
}: SHAForPullRequestEvent): Promise<DiffResult> => {
let targetBranch = github.context.payload.pull_request?.base?.ref
const currentBranch = github.context.payload.pull_request?.head?.ref
if (inputs.sinceLastRemoteCommit) {
@@ -330,7 +356,7 @@ export const getSHAForPullRequestEvent = async (
...gitFetchExtraArgs,
'-u',
'--progress',
'origin',
remoteName,
`pull/${github.context.payload.pull_request?.number}/head:${currentBranch}`
]
})
@@ -343,8 +369,8 @@ export const getSHAForPullRequestEvent = async (
'-u',
'--progress',
`--deepen=${inputs.fetchDepth}`,
'origin',
`+refs/heads/${currentBranch}*:refs/remotes/origin/${currentBranch}*`
remoteName,
`+refs/heads/${currentBranch}*:refs/remotes/${remoteName}/${currentBranch}*`
]
})
}
@@ -354,35 +380,32 @@ export const getSHAForPullRequestEvent = async (
'Failed to fetch pull request branch. Please ensure "persist-credentials" is set to "true" when checking out the repository. See: https://github.com/actions/checkout#usage'
)
}
core.debug('Fetching target branch...')
await gitFetch({
cwd: workingDirectory,
args: [
...gitFetchExtraArgs,
'-u',
'--progress',
`--deepen=${inputs.fetchDepth}`,
remoteName,
`+refs/heads/${github.context.payload.pull_request?.base?.ref}:refs/remotes/${remoteName}/${github.context.payload.pull_request?.base?.ref}`
]
})
if (!inputs.sinceLastRemoteCommit) {
core.debug('Fetching target branch...')
await gitFetch({
if (diffSubmodule) {
await gitFetchSubmodules({
cwd: workingDirectory,
args: [
...gitFetchExtraArgs,
'-u',
'--progress',
`--deepen=${inputs.fetchDepth}`,
'origin',
`+refs/heads/${targetBranch}:refs/remotes/origin/${targetBranch}`
`--deepen=${inputs.fetchDepth}`
]
})
if (hasSubmodule) {
await gitFetchSubmodules({
cwd: workingDirectory,
args: [
...gitFetchExtraArgs,
'-u',
'--progress',
`--deepen=${inputs.fetchDepth}`
]
})
}
}
} else {
if (hasSubmodule && inputs.fetchSubmoduleHistory) {
if (diffSubmodule && inputs.fetchAdditionalSubmoduleHistory) {
await gitFetchSubmodules({
cwd: workingDirectory,
args: [
@@ -427,10 +450,7 @@ export const getSHAForPullRequestEvent = async (
}
}
if (
!github.context.payload.pull_request?.base?.ref ||
github.context.payload.head?.repo?.fork === 'true'
) {
if (!github.context.payload.pull_request?.base?.ref) {
diff = '..'
}
@@ -487,17 +507,14 @@ export const getSHAForPullRequestEvent = async (
}
}
} else {
if (github.context.payload.action === 'closed') {
previousSha = github.context.payload.pull_request?.base?.sha
} else {
previousSha = github.context.payload.pull_request?.base?.sha
if (!previousSha) {
previousSha = await getRemoteBranchHeadSha({
cwd: workingDirectory,
remoteName,
branch: targetBranch
})
if (!previousSha) {
previousSha = github.context.payload.pull_request?.base?.sha
}
}
if (isShallow) {
@@ -513,7 +530,11 @@ export const getSHAForPullRequestEvent = async (
'Merge base is not in the local history, fetching remote target branch...'
)
for (let i = 1; i <= 10; i++) {
for (
let i = 1;
i <= (inputs.fetchMissingHistoryMaxRetries || 10);
i++
) {
await gitFetch({
cwd: workingDirectory,
args: [
@@ -521,8 +542,8 @@ export const getSHAForPullRequestEvent = async (
'-u',
'--progress',
`--deepen=${inputs.fetchDepth}`,
'origin',
`+refs/heads/${targetBranch}:refs/remotes/origin/${targetBranch}`
remoteName,
`+refs/heads/${targetBranch}:refs/remotes/${remoteName}/${targetBranch}`
]
})

29
src/constant.ts Normal file
View File

@@ -0,0 +1,29 @@
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,
excludeSubmodules: false,
fetchMissingHistoryMaxRetries: 20,
usePosixPathSeparator: false,
tagsPattern: '*',
tagsIgnorePattern: ''
}

View File

@@ -1,13 +1,10 @@
import * as core from '@actions/core'
export type Env = {
GITHUB_REF_NAME: string
GITHUB_REF: string
GITHUB_WORKSPACE: string
}
export const getEnv = async (): Promise<Env> => {
core.debug(`Process Env: ${JSON.stringify(process.env, null, 2)}`)
export const getEnv = async (): Promise<Env> => {
return {
GITHUB_REF_NAME: process.env.GITHUB_REF_NAME || '',
GITHUB_REF: process.env.GITHUB_REF || '',

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
@@ -52,6 +53,12 @@ export type Inputs = {
failOnInitialDiffError: boolean
failOnSubmoduleDiffError: boolean
negationPatternsFirst: boolean
useRestApi: boolean
excludeSubmodules: boolean
fetchMissingHistoryMaxRetries?: number
usePosixPathSeparator: boolean
tagsPattern: string
tagsIgnorePattern?: string
}
export const getInputs = (): Inputs => {
@@ -130,7 +137,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', {
@@ -152,8 +159,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',
@@ -194,7 +209,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
@@ -226,6 +241,35 @@ export const getInputs = (): Inputs => {
}
)
const useRestApi = core.getBooleanInput('use_rest_api', {
required: false
})
const excludeSubmodules = core.getBooleanInput('exclude_submodules', {
required: false
})
const fetchMissingHistoryMaxRetries = core.getInput(
'fetch_missing_history_max_retries',
{required: false}
)
const usePosixPathSeparator = core.getBooleanInput(
'use_posix_path_separator',
{
required: false
}
)
const tagsPattern = core.getInput('tags_pattern', {
required: false,
trimWhitespace: false
})
const tagsIgnorePattern = core.getInput('tags_ignore_pattern', {
required: false,
trimWhitespace: false
})
const inputs: Inputs = {
files,
filesSeparator,
@@ -250,7 +294,7 @@ export const getInputs = (): Inputs => {
since,
until,
path,
quotePath,
quotepath,
diffRelative,
sinceLastRemoteCommit,
recoverDeletedFiles,
@@ -263,8 +307,12 @@ export const getInputs = (): Inputs => {
oldNewSeparator,
oldNewFilesSeparator,
skipInitialFetch,
fetchSubmoduleHistory,
fetchAdditionalSubmoduleHistory,
dirNamesDeletedFilesIncludeOnlyDeletedDirs,
excludeSubmodules,
usePosixPathSeparator,
tagsPattern,
tagsIgnorePattern,
// End Not Supported via REST API
dirNames,
dirNamesExcludeCurrentDir,
@@ -272,15 +320,18 @@ export const getInputs = (): Inputs => {
dirNamesIncludeFilesSeparator,
json,
escapeJson,
safeOutput,
writeOutputFiles,
outputDir,
outputRenamedFilesAsDeletedAndAdded,
token,
apiUrl,
negationPatternsFirst
negationPatternsFirst,
useRestApi
}
if (fetchDepth) {
// Fallback to at least 2 if the fetch_depth is less than 2
inputs.fetchDepth = Math.max(parseInt(fetchDepth, 10), 2)
}
@@ -288,5 +339,13 @@ export const getInputs = (): Inputs => {
inputs.dirNamesMaxDepth = parseInt(dirNamesMaxDepth, 10)
}
if (fetchMissingHistoryMaxRetries) {
// Fallback to at least 1 if the fetch_missing_history_max_retries is less than 1
inputs.fetchMissingHistoryMaxRetries = Math.max(
parseInt(fetchMissingHistoryMaxRetries, 10),
1
)
}
return inputs
}

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) {
@@ -63,14 +64,26 @@ const getChangedFilesFromLocalGitHistory = async ({
}
const isShallow = await isRepoShallow({cwd: workingDirectory})
const hasSubmodule = await submoduleExists({cwd: workingDirectory})
let gitFetchExtraArgs = ['--no-tags', '--prune', '--recurse-submodules']
let diffSubmodule = false
let gitFetchExtraArgs = ['--no-tags', '--prune']
if (inputs.excludeSubmodules) {
core.info('Excluding submodules from the diff')
} else {
diffSubmodule = await submoduleExists({cwd: workingDirectory})
}
if (diffSubmodule) {
gitFetchExtraArgs.push('--recurse-submodules')
}
const isTag = env.GITHUB_REF?.startsWith('refs/tags/')
const remoteName = 'origin'
const outputRenamedFilesAsDeletedAndAdded =
inputs.outputRenamedFilesAsDeletedAndAdded
let submodulePaths: string[] = []
if (hasSubmodule) {
if (diffSubmodule) {
submodulePaths = await getSubmodulePath({cwd: workingDirectory})
}
@@ -82,29 +95,30 @@ const getChangedFilesFromLocalGitHistory = async ({
if (!github.context.payload.pull_request?.base?.ref) {
core.info(`Running on a ${github.context.eventName || 'push'} event...`)
diffResult = await getSHAForNonPullRequestEvent(
diffResult = await getSHAForNonPullRequestEvent({
inputs,
env,
workingDirectory,
isShallow,
hasSubmodule,
diffSubmodule,
gitFetchExtraArgs,
isTag
)
isTag,
remoteName
})
} else {
core.info(
`Running on a ${github.context.eventName || 'pull_request'} (${
github.context.payload.action
}) event...`
)
diffResult = await getSHAForPullRequestEvent(
diffResult = await getSHAForPullRequestEvent({
inputs,
env,
workingDirectory,
isShallow,
hasSubmodule,
gitFetchExtraArgs
)
diffSubmodule,
gitFetchExtraArgs,
remoteName
})
}
if (diffResult.initialCommit) {
@@ -119,11 +133,11 @@ const getChangedFilesFromLocalGitHistory = async ({
const allDiffFiles = await getAllDiffFiles({
workingDirectory,
hasSubmodule,
diffSubmodule,
diffResult,
submodulePaths,
outputRenamedFilesAsDeletedAndAdded,
fetchSubmoduleHistory: inputs.fetchSubmoduleHistory,
fetchAdditionalSubmoduleHistory: inputs.fetchAdditionalSubmoduleHistory,
failOnInitialDiffError: inputs.failOnInitialDiffError,
failOnSubmoduleDiffError: inputs.failOnSubmoduleDiffError
})
@@ -145,7 +159,7 @@ const getChangedFilesFromLocalGitHistory = async ({
deletedFiles: allDiffFiles[ChangeTypeEnum.Deleted],
recoverPatterns,
diffResult,
hasSubmodule,
diffSubmodule,
submodulePaths
})
}
@@ -163,7 +177,7 @@ const getChangedFilesFromLocalGitHistory = async ({
const allOldNewRenamedFiles = await getRenamedFiles({
inputs,
workingDirectory,
hasSubmodule,
diffSubmodule,
diffResult,
submodulePaths
})
@@ -173,7 +187,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',
@@ -219,11 +234,9 @@ export async function run(): Promise<void> {
const inputs = getInputs()
core.debug(`Inputs: ${JSON.stringify(inputs, null, 2)}`)
core.debug(`Github Context: ${JSON.stringify(github.context, null, 2)}`)
const workingDirectory = path.resolve(
env.GITHUB_WORKSPACE || process.cwd(),
inputs.path
inputs.useRestApi ? '.' : inputs.path
)
core.debug(`Working directory: ${workingDirectory}`)
@@ -242,35 +255,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,
@@ -278,10 +275,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')
@@ -295,10 +291,8 @@ export async function run(): Promise<void> {
}
}
/* istanbul ignore if */
if (!process.env.TESTING) {
// eslint-disable-next-line github/no-then
run().catch(e => {
core.setFailed(e.message || e)
})
}
// eslint-disable-next-line github/no-then
run().catch(e => {
core.setFailed(e.message || e)
process.exit(1)
})

View File

@@ -3,14 +3,14 @@ import * as core from '@actions/core'
import * as exec from '@actions/exec'
import * as github from '@actions/github'
import {createReadStream, promises as fs} from 'fs'
import {readFile} from 'fs/promises'
import {flattenDeep} from 'lodash'
import {flattenDeep, snakeCase} from 'lodash'
import mm from 'micromatch'
import * as path from 'path'
import {createInterface} from 'readline'
import {parseDocument} from 'yaml'
import {ChangedFiles, ChangeTypeEnum} from './changedFiles'
import {DiffResult} from './commitSha'
import {DEFAULT_VALUES_OF_UNSUPPORTED_API_INPUTS} from './constant'
import {Inputs} from './inputs'
const MINIMUM_GIT_VERSION = '2.18.0'
@@ -32,11 +32,13 @@ export const normalizeSeparators = (p: string): string => {
// Remove redundant slashes
const isUnc = /^\\\\+[^\\]/.test(p) // e.g. \\hello
return (isUnc ? '\\' : '') + p.replace(/\\\\+/g, '\\') // preserve leading \\ for UNC
p = (isUnc ? '\\' : '') + p.replace(/\\\\+/g, '\\') // preserve leading \\ for UNC
} else {
// Remove redundant slashes on Linux/macOS
p = p.replace(/\/\/+/g, '/')
}
// Remove redundant slashes
return p.replace(/\/\/+/g, '/')
return p
}
/**
@@ -171,15 +173,16 @@ async function* lineOfFileGenerator({
input: fileStream,
crlfDelay: Infinity
})
for await (const line of rl) {
for await (let line of rl) {
if (!line.startsWith('#') && line !== '') {
if (excludedFiles) {
if (line.startsWith('!')) {
yield line
} else {
yield `!${line}`
line = line.startsWith('!') ? line : `!${line}`
if (line.endsWith(path.sep)) {
line = `${line}**`
}
yield line
} else {
line = line.endsWith(path.sep) ? `${line}**` : line
yield line
}
}
@@ -285,6 +288,7 @@ export const submoduleExists = async ({
* Fetches the git repository
* @param args - arguments for fetch command
* @param cwd - working directory
* @returns exit code
*/
export const gitFetch = async ({
args,
@@ -333,6 +337,7 @@ export const gitFetchSubmodules = async ({
/**
* Retrieves all the submodule paths
* @param cwd - working directory
* @returns submodule paths
*/
export const getSubmodulePath = async ({
cwd
@@ -367,6 +372,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,
@@ -681,14 +687,16 @@ export const isInsideWorkTree = async ({
export const getRemoteBranchHeadSha = async ({
cwd,
branch
branch,
remoteName
}: {
cwd: string
branch: string
remoteName: string
}): Promise<string> => {
const {stdout} = await exec.getExecOutput(
'git',
['rev-parse', `origin/${branch}`],
['rev-parse', `${remoteName}/${branch}`],
{
cwd,
silent: !core.isDebug()
@@ -823,41 +831,80 @@ export const cleanShaInput = async ({
return stdout.trim()
}
export const getPreviousGitTag = async ({
cwd
cwd,
tagsPattern,
currentBranch,
tagsIgnorePattern
}: {
cwd: string
tagsPattern: string
currentBranch: string
tagsIgnorePattern?: string
}): Promise<{tag: string; sha: string}> => {
const ignorePatterns: string[] = []
let currentShaDate: Date | null = null
const {stdout} = await exec.getExecOutput(
'git',
['tag', '--sort=-creatordate'],
[
'tag',
'--sort=-creatordate',
'--format=%(refname:short)|%(objectname)|%(creatordate:iso)'
],
{
cwd,
silent: !core.isDebug()
}
)
const tags = stdout.trim().split('\n')
if (tags.length < 2) {
core.warning('No previous tag found')
return {tag: '', sha: ''}
if (tagsIgnorePattern) {
ignorePatterns.push(tagsIgnorePattern)
}
const previousTag = tags[1]
const {stdout: stdout2} = await exec.getExecOutput(
'git',
['rev-parse', previousTag],
{
cwd,
silent: !core.isDebug()
if (currentBranch) {
ignorePatterns.push(currentBranch)
try {
const {stdout: currentShaDateOutput} = await exec.getExecOutput(
'git',
['show', '-s', '--format=%ai', currentBranch],
{
cwd,
silent: !core.isDebug()
}
)
currentShaDate = new Date(currentShaDateOutput.trim())
} catch (error) {
// Handle the case where the current branch doesn't exist
// This might happen in detached head state
core.warning(`Failed to get date for current branch ${currentBranch}`)
}
)
}
const sha = stdout2.trim()
const previousTag: {tag: string; sha: string} = {tag: '', sha: ''}
return {tag: previousTag, sha}
const tags = stdout.trim().split('\n')
for (const tagData of tags) {
const [tag, sha, dateString] = tagData.split('|')
if (!mm.isMatch(tag, tagsPattern) || mm.isMatch(tag, ignorePatterns)) {
continue
}
const date = new Date(dateString)
if (currentShaDate && date >= currentShaDate) {
continue
}
// Found a suitable tag, no need to continue
previousTag.tag = tag
previousTag.sha = sha
break
}
if (!previousTag.tag) {
core.warning('No previous tag found')
}
return previousTag
}
export const canDiffCommits = async ({
@@ -898,7 +945,7 @@ export const canDiffCommits = async ({
} else {
const {exitCode, stderr} = await exec.getExecOutput(
'git',
['diff', '--quiet', sha1, sha2],
['diff', '--no-patch', sha1, sha2],
{
cwd,
ignoreReturnCode: true,
@@ -995,6 +1042,7 @@ export const getFilePatterns = async ({
if (inputs.files) {
const filesPatterns = inputs.files
.split(inputs.filesSeparator)
.map(p => (p.endsWith(path.sep) ? `${p}**` : p))
.filter(Boolean)
cleanedFilePatterns.push(...filesPatterns)
@@ -1026,8 +1074,9 @@ export const getFilePatterns = async ({
.split(inputs.filesIgnoreSeparator)
.filter(Boolean)
.map(p => {
if (!p.startsWith('!')) {
p = `!${p}`
p = p.startsWith('!') ? p : `!${p}`
if (p.endsWith(path.sep)) {
p = `${p}**`
}
return p
})
@@ -1128,7 +1177,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
}
@@ -1324,7 +1373,8 @@ export const setArrayOutput = async ({
writeOutputFiles: inputs.writeOutputFiles,
outputDir: inputs.outputDir,
json: inputs.json,
shouldEscape: inputs.escapeJson
shouldEscape: inputs.escapeJson,
safeOutput: inputs.safeOutput
})
}
@@ -1334,7 +1384,8 @@ export const setOutput = async ({
writeOutputFiles,
outputDir,
json = false,
shouldEscape = false
shouldEscape = false,
safeOutput = false
}: {
key: string
value: string | string[] | boolean
@@ -1342,6 +1393,7 @@ export const setOutput = async ({
outputDir: string
json?: boolean
shouldEscape?: boolean
safeOutput?: boolean
}): Promise<void> => {
let cleanedValue
if (json) {
@@ -1350,6 +1402,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) {
@@ -1397,7 +1454,7 @@ export const recoverDeletedFiles = async ({
deletedFiles,
recoverPatterns,
diffResult,
hasSubmodule,
diffSubmodule,
submodulePaths
}: {
inputs: Inputs
@@ -1405,7 +1462,7 @@ export const recoverDeletedFiles = async ({
deletedFiles: string[]
recoverPatterns: string[]
diffResult: DiffResult
hasSubmodule: boolean
diffSubmodule: boolean
submodulePaths: string[]
}): Promise<void> => {
let recoverableDeletedFiles = deletedFiles
@@ -1435,7 +1492,7 @@ export const recoverDeletedFiles = async ({
const submodulePath = submodulePaths.find(p => deletedFile.startsWith(p))
if (hasSubmodule && submodulePath) {
if (diffSubmodule && submodulePath) {
const submoduleShaResult = await gitSubmoduleDiffSHA({
cwd: workingDirectory,
parentSha1: diffResult.previousSha,
@@ -1483,6 +1540,12 @@ export const recoverDeletedFiles = async ({
}
}
/**
* Determines whether the specified working directory has a local Git directory.
*
* @param workingDirectory - The path of the working directory.
* @returns A boolean value indicating whether the working directory has a local Git directory.
*/
export const hasLocalGitDirectory = async ({
workingDirectory
}: {
@@ -1492,3 +1555,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`
)
}
}
}

2354
yarn.lock

File diff suppressed because it is too large Load Diff