Compare commits

...

414 Commits

Author SHA1 Message Date
renovate[bot]
56284d8081 chore(deps): update actions/setup-node action to v4.0.1 2023-12-18 13:24:36 +00:00
renovate[bot]
35ad6787f5 chore(deps): lock file maintenance 2023-12-18 01:38:30 +00:00
renovate[bot]
ca0db0ea03 chore(deps): update dependency @types/node to v20.10.5 2023-12-18 01:37:56 +00:00
renovate[bot]
03fcd0b3bb chore(deps): update dependency eslint to v8.56.0 2023-12-16 01:15:44 +00:00
Tonye Jack
35da2a2e01 Update README.md 2023-12-14 14:57:20 -07:00
renovate[bot]
2329d9fb48 chore(deps): lock file maintenance 2023-12-14 20:17:28 +00:00
renovate[bot]
154ca89d2e chore(deps): update actions/download-artifact action to v4 (#1793)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Tonye Jack <jtonye@ymail.com>
2023-12-14 13:00:10 -07:00
renovate[bot]
449352f10e chore(deps): update github/codeql-action action to v3 (#1792)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-13 17:06:49 +00:00
renovate[bot]
7c1826332f chore(deps): update typescript-eslint monorepo to v6.14.0 2023-12-11 18:39:28 +00:00
GitHub Action
af2816c654 Added missing changes and modified dist assets. 2023-12-10 19:45:40 +00:00
renovate[bot]
88be287f56 chore(deps): lock file maintenance 2023-12-10 19:45:40 +00:00
renovate[bot]
5513a5e205 chore(deps): update dependency prettier to v3.1.1 2023-12-10 11:22:16 +00:00
Tonye Jack
e7023fa1da Update README.md 2023-12-10 00:28:33 -07:00
tj-actions[bot]
46550b6fd9 Upgraded to v40.2.2 (#1787)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2023-12-10 07:24:06 +00:00
Tonye Jack
9454999946 fix: bug recovering deleted files for submodules (#1784)
Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2023-12-10 07:14:44 +00:00
tj-actions[bot]
7611ff348d Updated README.md (#1786)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2023-12-09 23:59:37 -07:00
allcontributors[bot]
187cf1e88c docs: add rodrigorfk as a contributor for code, test, and bug (#1785)
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2023-12-09 23:55:41 -07:00
dependabot[bot]
e1e532cff0 chore(deps): bump tj-actions/branch-names from 7 to 8 (#1782)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-08 01:50:07 +00:00
renovate[bot]
dfecec4fb7 chore(deps): update dependency @types/node to v20.10.4 2023-12-07 10:15:47 +00:00
Tonye Jack
c116f52a15 Update README.md 2023-12-06 21:44:31 -07:00
tj-actions[bot]
0b0b6429e1 Updated README.md (#1779)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2023-12-07 04:22:32 +00:00
Tonye Jack
f732c371a4 Update README.md 2023-12-06 21:14:34 -07:00
tj-actions[bot]
04c00459a2 Updated README.md (#1778)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2023-12-07 03:56:05 +00:00
Tonye Jack
5cee511ba5 Update README.md 2023-12-06 20:39:16 -07:00
Tonye Jack
399525a994 Update README.md 2023-12-06 20:37:51 -07:00
Tonye Jack
c075bd2719 Update README.md 2023-12-06 20:37:03 -07:00
renovate[bot]
208b83f295 chore(deps): update dependency typescript to v5.3.3 2023-12-06 21:22:39 +00:00
dependabot[bot]
ccb109a584 chore(deps-dev): bump @types/jest from 29.5.10 to 29.5.11 (#1775)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-06 02:00:42 +00:00
Tonye Jack
2918913341 Update README.md 2023-12-05 12:58:01 -07:00
Tonye Jack
a66176714d Deleted .github/workflows/auto-approve.yml 2023-12-04 21:09:51 -07:00
Tonye Jack
95642a1ebb chore: Update package.json (#1774) 2023-12-05 04:09:37 +00:00
Tonye Jack
726e06f8ef chore: Create SECURITY.md (#1773) 2023-12-04 20:52:31 -07:00
renovate[bot]
d96fe5d997 chore(deps): update typescript-eslint monorepo to v6.13.2 2023-12-04 19:47:16 +00:00
tj-actions[bot]
4ae611e5c5 Upgraded to v40.2.1 (#1771)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2023-12-04 03:46:41 +00:00
GitHub Action
1c938490c8 Added missing changes and modified dist assets. 2023-12-03 20:29:21 -07:00
renovate[bot]
ba558db977 chore(deps): lock file maintenance 2023-12-03 20:29:21 -07:00
renovate[bot]
bf19fa23a6 chore(deps): update dependency @types/node to v20.10.3 2023-12-03 21:37:55 +00:00
tj-actions[bot]
66b77cbd0c Updated README.md (#1769)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2023-12-03 14:16:56 -07:00
Tonye Jack
10bfa980b7 Update README.md 2023-12-03 14:15:28 -07:00
tj-actions[bot]
9e46b4f7f7 Updated README.md (#1767)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
Co-authored-by: Tonye Jack <jtonye@ymail.com>
2023-12-03 14:14:48 -07:00
Tonye Jack
3bf6172534 Update README.md 2023-12-03 12:46:59 -07:00
renovate[bot]
45581f0044 chore(deps): update dependency eslint-config-prettier to v9.1.0 2023-12-02 14:24:35 +00:00
renovate[bot]
9ebb48b57a chore(deps): update dependency eslint to v8.55.0 2023-12-02 01:04:38 +00:00
renovate[bot]
4e2dca3ba5 chore(deps): update dependency @types/node to v20.10.2 2023-12-01 21:10:58 +00:00
Tonye Jack
af6bdde59a security: Update test.yml removing pull_request_review event (#1763) 2023-11-29 22:28:34 -07:00
Tonye Jack
fc1fb2b582 test: verify bug writing outputs when files_yaml is used (#1762) 2023-11-29 17:03:50 -07:00
renovate[bot]
883b4ccbdb chore(deps): update dependency @types/node to v20.10.1 2023-11-29 20:45:42 +00:00
Tonye Jack
f91c9fe8b1 Deleted .github/workflows/greetings.yml 2023-11-29 09:01:35 -07:00
Tonye Jack
3ca6b80013 security: remove usage of pull_request_target event from test.yml (#1758) 2023-11-29 04:22:26 +00:00
GitHub Action
ee5ef758aa Added missing changes and modified dist assets. 2023-11-28 23:43:36 +00:00
renovate[bot]
42fe158594 chore(deps): lock file maintenance 2023-11-28 23:43:36 +00:00
tj-actions[bot]
48427afe26 Updated README.md (#1755)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2023-11-28 18:23:42 +00:00
Tonye Jack
5c74583cb3 chore: remove unused job (#1754) 2023-11-28 11:01:22 -07:00
Tonye Jack
742ed362b6 Update README.md 2023-11-28 09:58:20 -07:00
renovate[bot]
44d340e48c chore(deps): update typescript-eslint monorepo to v6.13.1 2023-11-28 10:36:38 +00:00
renovate[bot]
2561448da0 chore(deps): update typescript-eslint monorepo to v6.13.0 2023-11-27 18:14:41 +00:00
tj-actions[bot]
86cabf5ea2 Updated README.md (#1750)
Co-authored-by: repo-ranger[bot] <repo-ranger[bot]@users.noreply.github.com>
2023-11-27 17:57:48 +00:00
Tonye Jack
b5fc67a4f5 chore: update README.md (#1749) 2023-11-27 17:39:44 +00:00
tj-actions[bot]
0b22a52bff Upgraded to v40.2.0 (#1746)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2023-11-27 09:19:57 +00:00
Tonye Jack
da093c1609 fix: prevent similar commit hashes error when using the branch name (#1745)
Co-authored-by: GitHub Action <action@github.com>
2023-11-27 08:36:29 +00:00
Tonye Jack
c634be959b fix: prevent similar commit hashes error when using the branch name (#1744)
Co-authored-by: GitHub Action <action@github.com>
2023-11-27 07:54:44 +00:00
Tonye Jack
2139fa1b6f feat: add support for passing branch name to the base_sha and sha inputs (#1742) 2023-11-27 07:11:43 +00:00
Tonye Jack
6784c9e1ee Update README.md 2023-11-26 18:51:22 -07:00
GitHub Action
607d5ddbbf Added missing changes and modified dist assets. 2023-11-27 00:31:36 +00:00
renovate[bot]
d588360bfe chore(deps): lock file maintenance 2023-11-27 00:31:36 +00:00
Tonye Jack
90f2c0c1b1 Update greetings.yml 2023-11-26 00:11:12 -07:00
renovate[bot]
0d6e9b7196 chore(deps): update dependency @types/node to v20.10.0 2023-11-24 10:34:08 +00:00
renovate[bot]
8f90cc165a chore(deps): update dependency @types/node to v20.9.5 2023-11-24 00:53:37 +00:00
renovate[bot]
75758bc65f chore(deps): update dependency @types/jest to v29.5.10 2023-11-22 02:04:07 +00:00
dependabot[bot]
066e72a5fb Bump @types/node from 20.9.3 to 20.9.4 (#1732)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-22 01:46:19 +00:00
dependabot[bot]
c23e564e67 Bump @types/jest from 29.5.8 to 29.5.9 (#1726)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2023-11-21 11:41:03 -07:00
dependabot[bot]
c0080255e3 Bump @types/micromatch from 4.0.5 to 4.0.6 (#1727)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2023-11-21 11:36:41 -07:00
dependabot[bot]
3a3d3a2b86 Bump @types/lodash from 4.14.201 to 4.14.202 (#1728)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2023-11-21 07:05:39 -07:00
renovate[bot]
79ef9d3fee chore(deps): update dependency @types/lodash to v4.14.202 2023-11-21 04:02:59 +00:00
renovate[bot]
da4597ee22 chore(deps): update dependency @types/micromatch to v4.0.6 2023-11-21 03:41:54 +00:00
renovate[bot]
9f4ec1c14f chore(deps): update dependency @types/jest to v29.5.9 2023-11-21 03:21:14 +00:00
dependabot[bot]
4da6e32cfe Bump @types/node from 20.9.2 to 20.9.3 (#1725)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-21 02:31:14 +00:00
GitHub Action
7f1c4cb6db Added missing changes and modified dist assets. 2023-11-20 20:48:07 +00:00
renovate[bot]
939fbca781 chore(deps): update dependency typescript to v5.3.2 2023-11-20 20:48:07 +00:00
renovate[bot]
9ba175ae24 chore(deps): update typescript-eslint monorepo to v6.12.0 2023-11-20 17:41:59 +00:00
tj-actions[bot]
f7779a6302 Updated README.md (#1722)
Co-authored-by: repo-ranger[bot] <repo-ranger[bot]@users.noreply.github.com>
2023-11-20 03:15:32 +00:00
Tonye Jack
05bdc91228 chore: simplify matrix example workflow (#1719)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2023-11-20 03:05:34 +00:00
tj-actions[bot]
6d07b6ee59 Updated README.md (#1721)
Co-authored-by: renovate[bot] <renovate[bot]@users.noreply.github.com>
2023-11-20 02:16:46 +00:00
GitHub Action
1cf54bb5d3 Added missing changes and modified dist assets. 2023-11-20 02:06:41 +00:00
renovate[bot]
21b4a4bc7b chore(deps): lock file maintenance 2023-11-20 02:06:41 +00:00
renovate[bot]
658f397297 chore(deps): update dependency @types/node to v20.9.2 2023-11-18 23:22:56 +00:00
renovate[bot]
38a0c329bb chore(deps): update dependency eslint to v8.54.0 2023-11-17 22:45:21 +00:00
renovate[bot]
b0be21b8df chore(deps): update dependency @types/node to v20.9.1 2023-11-16 23:06:36 +00:00
tj-actions[bot]
97825a1994 Updated README.md (#1714)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2023-11-16 15:14:50 +00:00
Tonye Jack
13189f9e52 chore: update action.yml 2023-11-16 08:02:45 -07:00
tj-actions[bot]
2a9f067522 Updated README.md (#1713)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2023-11-15 19:50:40 +00:00
Tonye Jack
ad01f6fdba chore: update action inputs description 2023-11-15 12:41:33 -07:00
tj-actions[bot]
b082611680 Updated README.md (#1712)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2023-11-15 16:07:40 +00:00
Tonye Jack
a36c479373 chore: update input description 2023-11-15 08:55:35 -07:00
tj-actions[bot]
90a4f2a326 Updated README.md (#1711)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2023-11-15 15:49:57 +00:00
Tonye Jack
41ff1f2249 chore: update input description 2023-11-15 08:38:50 -07:00
tj-actions[bot]
b20ce84763 Updated README.md (#1710)
Co-authored-by: repo-ranger[bot] <repo-ranger[bot]@users.noreply.github.com>
2023-11-15 05:46:02 +00:00
Tonye Jack
875213d4a9 chore: Update update-readme.yml (#1709) 2023-11-15 05:33:58 +00:00
renovate[bot]
71b57652f0 chore(deps): update typescript-eslint monorepo to v6.11.0 2023-11-13 17:52:21 +00:00
renovate[bot]
834b86247e chore(deps): update dependency prettier to v3.1.0 2023-11-13 04:30:36 +00:00
GitHub Action
d8d3669cb3 Added missing changes and modified dist assets. 2023-11-13 00:39:11 +00:00
renovate[bot]
940b170a31 chore(deps): lock file maintenance 2023-11-13 00:39:11 +00:00
tj-actions[bot]
55b93d0734 Upgraded to v40.1.1 (#1704)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2023-11-08 03:46:18 +00:00
renovate[bot]
25ef3926d1 chore(deps): update dependency @types/node to v20.9.0 2023-11-08 00:43:20 +00:00
renovate[bot]
4d33bd5f9c chore(deps): update dependency @types/lodash to v4.14.201 2023-11-07 23:16:36 +00:00
renovate[bot]
f25e47258b chore(deps): update dependency @types/micromatch to v4.0.5 2023-11-07 23:03:38 +00:00
renovate[bot]
a3c4ccbde0 chore(deps): update dependency @types/uuid to v9.0.7 2023-11-07 22:37:06 +00:00
renovate[bot]
b114534101 chore(deps): update dependency @types/jest to v29.5.8 2023-11-07 21:40:54 +00:00
renovate[bot]
303f064ba9 chore(deps): update typescript-eslint monorepo to v6.10.0 2023-11-06 20:04:14 +00:00
GitHub Action
e981e53b7f Added missing changes and modified dist assets. 2023-11-06 00:44:12 +00:00
renovate[bot]
d850ef91f7 chore(deps): lock file maintenance 2023-11-06 00:44:12 +00:00
renovate[bot]
8701b586f3 chore(deps): update dependency eslint to v8.53.0 2023-11-04 01:22:05 +00:00
tj-actions[bot]
9b1ba9a603 Upgraded to v40.1.0 (#1695)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2023-11-03 21:08:31 +00:00
tj-actions[bot]
18c8a4eceb Updated README.md (#1694)
Co-authored-by: repo-ranger[bot] <repo-ranger[bot]@users.noreply.github.com>
2023-11-03 20:30:38 +00:00
Tonye Jack
892553a457 feat: add support for controlling the pattern order (#1693)
Co-authored-by: GitHub Action <action@github.com>
2023-11-03 20:19:40 +00:00
GitHub Action
50a9cc9b7b Added missing changes and modified dist assets. 2023-11-03 04:57:00 +00:00
renovate[bot]
c300d15dae fix(deps): update dependency yaml to v2.3.4 2023-11-03 04:57:00 +00:00
tj-actions[bot]
c076064636 Upgraded to v40.0.2 (#1689)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2023-10-31 18:56:37 +00:00
Tonye Jack
40526807ee fix: order of file patterns (#1688)
Co-authored-by: GitHub Action <action@github.com>
2023-10-31 18:39:35 +00:00
renovate[bot]
a59bf8ffcf chore(deps): update dependency @types/node to v20.8.10 2023-10-31 12:31:02 +00:00
tj-actions[bot]
6821899764 Upgraded to v40.0.1 (#1686)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2023-10-31 00:37:06 +00:00
renovate[bot]
bfc49f4cff chore(deps): update dependency @types/jest to v29.5.7 2023-10-30 22:36:16 +00:00
Tonye Jack
7549e1e4b9 fix: bug with order in which the files and files ignore patterns are combined (#1684)
Co-authored-by: GitHub Action <action@github.com>
2023-10-30 22:18:54 +00:00
renovate[bot]
2fc653d87d chore(deps): update dependency @typescript-eslint/eslint-plugin to v6.9.1 2023-10-30 20:51:25 +00:00
renovate[bot]
273a7c1641 chore(deps): update dependency @typescript-eslint/parser to v6.9.1 2023-10-30 17:47:17 +00:00
GitHub Action
905fcf74f4 Added missing changes and modified dist assets. 2023-10-30 01:41:37 +00:00
renovate[bot]
229fe310d2 chore(deps): lock file maintenance 2023-10-30 01:41:37 +00:00
Tonye Jack
85073ea010 Update README.md 2023-10-28 22:42:46 -06:00
Tonye Jack
e622bd9227 Update README.md 2023-10-28 09:35:56 -06:00
Tonye Jack
003b42ec7f Update README.md 2023-10-28 09:34:36 -06:00
Tonye Jack
0a5a862874 Update README.md 2023-10-27 11:24:18 -06:00
tj-actions[bot]
1864dc5311 Updated README.md (#1678)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2023-10-27 07:13:13 +00:00
Tonye Jack
1be6574035 Update action.yml 2023-10-27 01:01:11 -06:00
tj-actions[bot]
51bc7ab145 Updated README.md (#1677)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2023-10-27 04:50:16 +00:00
Tonye Jack
b49b468c28 Update README.md 2023-10-26 22:36:00 -06:00
Tonye Jack
8055b31e95 Update README.md 2023-10-26 22:34:26 -06:00
renovate[bot]
c371c6f055 chore(deps): update dependency eslint-plugin-jest to v27.6.0 2023-10-26 22:10:59 +00:00
renovate[bot]
7448ec4f69 chore(deps): update dependency eslint-plugin-jest to v27.5.0 2023-10-26 21:01:49 +00:00
tj-actions[bot]
d1f3041043 Updated README.md (#1675)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2023-10-26 14:45:16 -06:00
Tonye Jack
d0064d8549 Update README.md 2023-10-26 14:44:18 -06:00
Tonye Jack
4270b9fd4b Update README.md 2023-10-26 14:35:10 -06:00
tj-actions[bot]
cd07d32e58 Updated README.md (#1673)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2023-10-26 12:39:20 +00:00
Tonye Jack
33ddc07d8b Update action.yml 2023-10-26 06:28:05 -06:00
tj-actions[bot]
1c7fbaba14 Upgraded to v40 (#1672)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2023-10-26 04:24:35 +00:00
GitHub Action
af292f1e84 Added missing changes and modified dist assets. 2023-10-26 04:01:57 +00:00
renovate[bot]
2ddcb04986 chore(deps): lock file maintenance 2023-10-26 04:01:57 +00:00
Tonye Jack
3ce5a2970f remove: appending globstar pattern for directories to prevent bugs with path matching (#1670)
Co-authored-by: GitHub Action <action@github.com>
2023-10-26 03:35:54 +00:00
Tonye Jack
d898dd09e4 chore: Update test.yml 2023-10-25 21:25:02 -06:00
renovate[bot]
0e08afd95d chore(deps): update dependency @types/node to v20.8.9 2023-10-25 19:14:28 +00:00
dependabot[bot]
955cdc8d81 Bump @types/node from 20.8.7 to 20.8.8 (#1666)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-24 02:01:22 +00:00
GitHub Action
e48cacbca5 Added missing changes and modified dist assets. 2023-10-24 00:45:54 +00:00
renovate[bot]
5aee572571 chore(deps): lock file maintenance 2023-10-24 00:45:54 +00:00
tj-actions[bot]
c83cb31f5b Upgraded to v39.2.4 (#1664)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2023-10-23 19:13:35 +00:00
renovate[bot]
fea790cb66 chore(deps): update typescript-eslint monorepo to v6.9.0 2023-10-23 18:01:32 +00:00
renovate[bot]
794c26fb9f chore(deps): update actions/setup-node action to v4 (#1662)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-23 17:20:57 +00:00
renovate[bot]
0f6525cd7d chore(deps): update actions/setup-node action to v3.8.2 2023-10-23 15:08:13 +00:00
GitHub Action
28cf22057f Added missing changes and modified dist assets. 2023-10-23 01:11:13 +00:00
renovate[bot]
faedee1163 chore(deps): lock file maintenance 2023-10-23 01:11:13 +00:00
renovate[bot]
4a7ca97de0 chore(deps): update dependency eslint-plugin-jest to v27.4.3 2023-10-21 02:23:07 +00:00
renovate[bot]
cef68eee2e chore(deps): update dependency eslint to v8.52.0 2023-10-20 22:13:15 +00:00
GitHub Action
40e81cc72b Added missing changes and modified dist assets. 2023-10-18 23:13:24 +00:00
renovate[bot]
4d1f5becef chore(deps): update dependency @vercel/ncc to v0.38.1 2023-10-18 23:13:24 +00:00
renovate[bot]
c82b7e2992 chore(deps): update dependency @types/uuid to v9.0.6 2023-10-18 22:56:39 +00:00
renovate[bot]
02eb5a78aa chore(deps): update dependency @types/node to v20.8.7 2023-10-18 15:12:31 +00:00
renovate[bot]
2cee40ea93 chore(deps): update dependency @types/lodash to v4.14.200 2023-10-18 10:15:28 +00:00
renovate[bot]
5b02f7c186 chore(deps): update dependency @types/micromatch to v4.0.4 2023-10-18 09:59:00 +00:00
renovate[bot]
2e7f228016 chore(deps): update dependency @types/jest to v29.5.6 2023-10-18 09:31:33 +00:00
tj-actions[bot]
8a78ebb29f Upgraded to v39.2.3 (#1649)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2023-10-17 02:07:42 +00:00
Tonye Jack
95690f9ece fix: bug returning files with matched patterns (#1648)
Co-authored-by: GitHub Action <action@github.com>
2023-10-17 01:48:26 +00:00
renovate[bot]
97266423db chore(deps): update typescript-eslint monorepo to v6.8.0 2023-10-16 18:37:36 +00:00
renovate[bot]
af4b210111 chore(deps): lock file maintenance 2023-10-16 01:59:46 +00:00
GitHub Action
2a10bef1b4 Added missing changes and modified dist assets. 2023-10-14 15:25:53 +00:00
renovate[bot]
5c45808ea0 chore(deps): lock file maintenance 2023-10-14 15:25:53 +00:00
GitHub Action
a82ffc67b3 Added missing changes and modified dist assets. 2023-10-14 10:33:08 +00:00
renovate[bot]
44225688bb fix(deps): update dependency yaml to v2.3.3 2023-10-14 10:33:08 +00:00
renovate[bot]
f144a9e6da chore(deps): update dependency @types/node to v20.8.6 2023-10-14 00:38:43 +00:00
renovate[bot]
d08f64adf6 chore(deps): update dependency @types/node to v20.8.5 2023-10-12 23:35:10 +00:00
tj-actions[bot]
2d0db8be9e Upgraded to v39.2.2 (#1639)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2023-10-12 00:43:51 +00:00
GitHub Action
408093d9ff Added missing changes and modified dist assets. 2023-10-11 13:03:43 +00:00
renovate[bot]
a8fcc78511 chore(deps): lock file maintenance 2023-10-11 13:03:43 +00:00
Tonye Jack
49e754c81d Update README.md 2023-10-11 06:41:57 -06:00
renovate[bot]
3b9406ef82 chore(deps): update dependency eslint-plugin-prettier to v5.0.1 2023-10-11 04:57:59 +00:00
renovate[bot]
1d9d8f4a76 fix(deps): update dependency @actions/github to v6 (#1636)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: GitHub Action <action@github.com>
2023-10-10 17:58:18 +00:00
renovate[bot]
6777efe3ca chore(deps): update nrwl/nx-set-shas action to v4 (#1635)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2023-10-09 15:18:59 -06:00
renovate[bot]
2b4a057e15 chore(deps): update typescript-eslint monorepo to v6.7.5 2023-10-09 20:46:12 +00:00
renovate[bot]
1e88b750d4 chore(deps): update dependency @types/node to v20.8.4 2023-10-09 20:17:55 +00:00
tj-actions[bot]
57421690e0 Updated README.md (#1632)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2023-10-07 18:00:52 +00:00
Tonye Jack
1c14cc7ff3 Update README.md 2023-10-07 11:49:50 -06:00
renovate[bot]
54864d4c3b chore(deps): update dependency @types/node to v20.8.3 2023-10-07 01:31:51 +00:00
renovate[bot]
8f6e85fcdf chore(deps): update dependency eslint to v8.51.0 2023-10-06 21:42:42 +00:00
Tonye Jack
6cd5b66101 Update README.md 2023-10-03 19:17:20 -06:00
tj-actions[bot]
3729bf289f Upgraded to v39.2.1 (#1628)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2023-10-03 00:59:26 +00:00
Tonye Jack
db153baf73 chore: clean up test (#1627) 2023-10-03 00:09:57 +00:00
Tonye Jack
344b35fc53 Update issue-comment-test.yml 2023-10-02 17:51:35 -06:00
Tonye Jack
f318653745 chore: update issue-comment-test.yml 2023-10-02 17:48:31 -06:00
Tonye Jack
3415b43780 fix: incorrect branch name for issue_comment event (#1625)
Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2023-10-02 23:35:05 +00:00
renovate[bot]
15f38d6693 chore(deps): update dependency @types/node to v20.8.2 2023-10-02 22:25:06 +00:00
Tonye Jack
2160c8e998 chore: create issue-comment-test.yml (#1624) 2023-10-02 14:09:29 -06:00
renovate[bot]
39084f937a chore(deps): update typescript-eslint monorepo to v6.7.4 2023-10-02 19:40:25 +00:00
renovate[bot]
22a6a7dedc chore(deps): update dependency @types/node to v20.8.0 2023-09-30 11:09:39 +00:00
renovate[bot]
8f93691a81 chore(deps): update dependency eslint-plugin-jest to v27.4.2 2023-09-29 23:02:16 +00:00
renovate[bot]
c5c7d8163f chore(deps): update dependency @types/node to v20.7.2 2023-09-29 17:37:16 +00:00
Tonye Jack
e061de58da Update README.md 2023-09-28 11:37:08 -06:00
renovate[bot]
6f90eecfe8 chore(deps): update dependency @types/node to v20.7.1 2023-09-27 23:16:15 +00:00
renovate[bot]
4daaa8171d chore(deps): update dependency @types/micromatch to v4.0.3 2023-09-27 10:33:51 +00:00
renovate[bot]
cbff9146e3 chore(deps): update dependency eslint-plugin-github to v4.10.1 2023-09-26 17:35:46 +00:00
Tonye Jack
2d7c10954b Update README.md 2023-09-26 09:53:45 -06:00
Tonye Jack
6e74c9dbbb Update README.md 2023-09-25 17:46:27 -06:00
renovate[bot]
44827f39da chore(deps): update dependency @types/node to v20.7.0 2023-09-25 23:36:24 +00:00
renovate[bot]
2ba385a5e1 fix(deps): update dependency @octokit/rest to v20.0.2 2023-09-25 23:16:43 +00:00
renovate[bot]
7d9358afc1 chore(deps): update typescript-eslint monorepo to v6.7.3 2023-09-25 20:17:10 +00:00
tj-actions[bot]
cf03855076 Updated README.md (#1612)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2023-09-25 05:51:24 +00:00
Tonye Jack
877b5ce98c Update README.md 2023-09-24 23:39:22 -06:00
Tonye Jack
428220b7f4 chore: updated list of unsupported inputs when using REST API (#1611)
Co-authored-by: GitHub Action <action@github.com>
2023-09-25 00:10:27 +00:00
renovate[bot]
914e0223cf chore(deps): update dependency @types/node to v20.6.5 2023-09-24 18:51:27 +00:00
renovate[bot]
b79cd45602 chore(deps): lock file maintenance 2023-09-24 04:58:10 +00:00
renovate[bot]
19107de46c chore(deps): update dependency @types/node to v20.6.4 2023-09-23 21:53:24 +00:00
renovate[bot]
29dd1b9c76 chore(deps): update dependency @types/lodash to v4.14.199 2023-09-23 00:24:01 +00:00
tj-actions[bot]
dac82b0e15 Updated README.md (#1606)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2023-09-23 00:06:26 +00:00
Tonye Jack
4595c4c56b Update README.md 2023-09-22 17:55:18 -06:00
renovate[bot]
39000e536b chore(deps): update dependency eslint to v8.50.0 2023-09-22 22:19:18 +00:00
tj-actions[bot]
181ee9b66b Upgraded to v39.2.0 (#1604)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2023-09-22 20:38:22 +00:00
renovate[bot]
9053f9ea11 chore(deps): lock file maintenance 2023-09-22 20:18:48 +00:00
tj-actions[bot]
8238a41032 Updated README.md (#1602)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2023-09-22 13:48:09 -06:00
Tonye Jack
aaf4339aa1 Merge pull request #1601 from tj-actions/feat/add-support-for-restricting-the-deleted-files-output-to-only-deleted-directories 2023-09-22 13:45:16 -06:00
Tonye Jack
d2486b470f Update test 2023-09-22 12:59:02 -06:00
Tonye Jack
e7fd9e59a4 Updated test 2023-09-22 12:52:27 -06:00
repo-ranger[bot]
e3cc088a96 Merge branch 'main' into feat/add-support-for-restricting-the-deleted-files-output-to-only-deleted-directories 2023-09-22 18:38:48 +00:00
renovate[bot]
72d7089b72 chore(deps): update actions/checkout digest to 8ade135 2023-09-22 18:36:50 +00:00
Tonye Jack
e94da5a065 Fixed test for windows 2023-09-22 12:25:28 -06:00
Tonye Jack
a721d001dd Fixed the test 2023-09-22 12:15:09 -06:00
GitHub Action
8af3110d4d Added missing changes and modified dist assets. 2023-09-22 17:07:10 +00:00
Tonye Jack
a351a301d2 Merge 62a23f82b1 into 0b947ed818 2023-09-22 17:05:50 +00:00
Tonye Jack
62a23f82b1 Updated debug message 2023-09-22 11:05:42 -06:00
Tonye Jack
ef42e5ad18 Update test 2023-09-22 10:36:41 -06:00
Tonye Jack
cd1e384723 Deleted the test3 directory 2023-09-22 10:23:52 -06:00
Tonye Jack
a52f8621d2 Deleted a single test file 2023-09-22 10:22:56 -06:00
Tonye Jack
920856cfdd Added a test files 2023-09-22 10:21:55 -06:00
Tonye Jack
08906b3254 Updated the test 2023-09-22 10:14:29 -06:00
Tonye Jack
cd35eace22 Updated description 2023-09-22 10:06:37 -06:00
GitHub Action
8296c33fd0 Added missing changes and modified dist assets. 2023-09-22 16:06:08 +00:00
Tonye Jack
0ad71b9855 Merge c98e6d20fc into 0b947ed818 2023-09-22 10:02:09 -06:00
Tonye Jack
c98e6d20fc Removed unused code 2023-09-22 10:01:57 -06:00
GitHub Action
2398551415 Added missing changes and modified dist assets. 2023-09-22 10:01:57 -06:00
Tonye Jack
060b3b9b03 Removed unused code 2023-09-22 10:01:57 -06:00
GitHub Action
ff65504325 Added missing changes and modified dist assets. 2023-09-22 10:01:57 -06:00
Tonye Jack
543c1a25c6 Updated use of deletedFilesPaths 2023-09-22 10:01:57 -06:00
Tonye Jack
1be42003d7 Updated action.yml 2023-09-22 10:01:57 -06:00
GitHub Action
2325baada3 Added missing changes and modified dist assets. 2023-09-22 10:01:57 -06:00
Tonye Jack
e6ce728d79 feat: add support for restricting the deleted files output to only deleted directories 2023-09-22 10:01:57 -06:00
Tonye Jack
0b947ed818 Update README.md 2023-09-22 07:31:05 -06:00
Tonye Jack
e8dbf6d670 Update README.md 2023-09-20 19:48:40 -06:00
tj-actions[bot]
41c232aad8 Upgraded to v39.1.2 (#1594)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2023-09-20 21:03:55 +00:00
Tonye Jack
4196030939 chore: add warrning message to diff error (#1593)
Co-authored-by: GitHub Action <action@github.com>
2023-09-20 19:14:07 +00:00
renovate[bot]
bbe796033e chore(deps): update dependency @types/node to v20.6.3 2023-09-20 03:33:59 +00:00
tj-actions[bot]
159562dc02 Upgraded to v39.1.1 (#1591)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2023-09-19 20:38:19 +00:00
Tonye Jack
a21a533a0c Update test.yml 2023-09-19 14:21:54 -06:00
Tonye Jack
eeb169a9f9 chore: add codacy config (#1590)
Co-authored-by: GitHub Action <action@github.com>
2023-09-19 14:19:15 -06:00
Arthur
951140b94a fix: changed_keys and modified_keys output to handle json and escape_json inputs (#1585)
Co-authored-by: Arthur Volant <arthur.volant@adevinta.com>
Co-authored-by: Tonye Jack <jtonye@ymail.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2023-09-19 19:18:22 +00:00
Tonye Jack
dbf0700c7a fix: error with test (#1589) 2023-09-19 12:10:14 -06:00
tj-actions[bot]
dacbaebcaf Updated README.md (#1588)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2023-09-19 16:58:27 +00:00
allcontributors[bot]
36ab2fe9c2 docs: add V0lantis as a contributor for bug (#1587)
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2023-09-19 10:39:08 -06:00
Tonye Jack
7e3a4bac80 chore: Update test.yml (#1586) 2023-09-19 16:09:34 +00:00
Tonye Jack
dcbe9805f4 chore: move variable declaration (#1584)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
Co-authored-by: tj-actions[bot] <109116665+tj-actions-bot@users.noreply.github.com>
Co-authored-by: GitHub Action <action@github.com>
2023-09-18 23:37:47 +00:00
tj-actions[bot]
fd73c1248c Upgraded to v39.1.0 (#1583)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2023-09-18 20:39:02 +00:00
tj-actions[bot]
8e79ba7ab9 Updated README.md (#1582)
Co-authored-by: repo-ranger[bot] <repo-ranger[bot]@users.noreply.github.com>
2023-09-18 14:22:58 -06:00
Tonye Jack
5db7b578d5 feat: add support for returning YAML keys for paths that have changed (#1581)
Co-authored-by: GitHub Action <action@github.com>
2023-09-18 20:17:46 +00:00
renovate[bot]
a17e8c5252 chore(deps): update typescript-eslint monorepo to v6.7.2 2023-09-18 19:14:08 +00:00
renovate[bot]
d1e9506b19 chore(deps): lock file maintenance 2023-09-18 02:01:10 +00:00
tj-actions[bot]
1fdfe0928a Upgraded to v39.0.3 (#1577)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2023-09-17 21:34:54 +00:00
Tonye Jack
76c4d81a6a chore: cleanup imports (#1576) 2023-09-17 03:16:01 +00:00
Tonye Jack
d8904df6c5 chore: refactor function (#1572)
Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2023-09-16 11:44:37 +00:00
renovate[bot]
662c03ea61 chore(deps): update dependency @types/node to v20.6.2 2023-09-16 09:06:38 +00:00
renovate[bot]
c8b7da7226 chore(deps): update dependency eslint-plugin-jest to v27.4.0 2023-09-16 00:28:53 +00:00
renovate[bot]
249c1698c5 chore(deps): update dependency @types/jest to v29.5.5 2023-09-15 22:09:24 +00:00
renovate[bot]
17352b2176 chore(deps): update dependency @types/node to v20.6.1 2023-09-15 08:58:26 +00:00
tj-actions[bot]
e8e6614779 Updated README.md (#1570)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2023-09-14 22:07:53 -06:00
Tonye Jack
ad4b06d999 Update README.md 2023-09-14 21:59:38 -06:00
Tonye Jack
b1a34eb336 Update README.md 2023-09-14 21:58:35 -06:00
Tonye Jack
d9a6ccb099 chore: update README.md (#1569) 2023-09-14 17:38:21 +00:00
renovate[bot]
090eb05f17 chore(deps): update dependency @types/uuid to v9.0.4 2023-09-14 15:58:41 +00:00
tj-actions[bot]
690bef673a Updated README.md (#1566)
Co-authored-by: repo-ranger[bot] <repo-ranger[bot]@users.noreply.github.com>
2023-09-13 17:36:28 +00:00
Tonye Jack
fb8d2c9c29 chore: update input description (#1565) 2023-09-13 17:25:26 +00:00
Tonye Jack
bb3b39cd33 Update README.md 2023-09-13 07:45:12 -06:00
renovate[bot]
001f56257c chore(deps): update dependency jest to v29.7.0 2023-09-12 09:59:39 +00:00
tj-actions[bot]
57245a9721 Upgraded to v39.0.2 (#1563)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2023-09-12 02:19:34 +00:00
renovate[bot]
6ee9cdc581 chore(deps): update typescript-eslint monorepo to v6.7.0 2023-09-11 19:21:13 +00:00
GitHub Action
dc40835d4d Added missing changes and modified dist assets. 2023-09-11 17:08:01 +00:00
renovate[bot]
7e3122dc95 fix(deps): update dependency @actions/core to v1.10.1 2023-09-11 17:08:01 +00:00
renovate[bot]
073479583b chore(deps): lock file maintenance 2023-09-09 12:28:32 +00:00
renovate[bot]
d76ddeeeaa chore(deps): lock file maintenance 2023-09-09 03:38:50 +00:00
tj-actions[bot]
7cdc56dd7a Upgraded to v39.0.1 (#1557)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2023-09-09 03:25:27 +00:00
Tonye Jack
246636f5fa fix: bug returning empty output for pull request close event (#1556)
Co-authored-by: GitHub Action <action@github.com>
2023-09-09 03:02:46 +00:00
Tonye Jack
fe0fb71961 Update README.md 2023-09-08 20:43:21 -06:00
Tonye Jack
e60a7a9173 Update README.md 2023-09-08 20:41:04 -06:00
Tonye Jack
81bb5d8954 chore: update check (#1555)
Co-authored-by: GitHub Action <action@github.com>
2023-09-09 01:39:42 +00:00
Tonye Jack
523e8b6f11 fix: raise error when the previous sha cannot be determined and since_last_remote_commit is true (#1554)
Co-authored-by: GitHub Action <action@github.com>
2023-09-08 19:18:37 -06:00
renovate[bot]
4a0a3c4aa5 chore(deps): update dependency eslint to v8.49.0 2023-09-08 22:14:25 +00:00
renovate[bot]
9dfd3f686b chore(deps): update dependency @types/node to v20.6.0 2023-09-08 21:58:21 +00:00
Tonye Jack
796ac2d08f fix: raise errors when unable to locate the previous commit in local history (#1551)
Co-authored-by: GitHub Action <action@github.com>
2023-09-08 18:31:25 +00:00
tj-actions[bot]
534262e0b2 Updated README.md (#1548)
Co-authored-by: repo-ranger[bot] <repo-ranger[bot]@users.noreply.github.com>
2023-09-08 12:12:32 +00:00
Tonye Jack
673189f77b chore: Update docs to site example (#1547) 2023-09-08 12:00:24 +00:00
tj-actions[bot]
89cb9ea919 Updated README.md (#1546)
Co-authored-by: renovate[bot] <renovate[bot]@users.noreply.github.com>
2023-09-07 15:01:23 +00:00
renovate[bot]
7113206187 chore(deps): lock file maintenance 2023-09-07 14:48:08 +00:00
Tonye Jack
926a3fd777 chore: add warning on valid output keys (#1544) 2023-09-07 14:27:55 +00:00
renovate[bot]
de23f62d1e chore(deps): update reviewdog/action-shellcheck action to v1.19 2023-09-06 23:38:08 +00:00
renovate[bot]
afbabc4364 chore(deps): update dependency @vercel/ncc to ^0.38.0 2023-09-06 20:49:21 +00:00
renovate[bot]
eda0811ed2 chore(deps): update tj-actions/eslint-changed-files action to v21 (#1539)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-06 04:39:25 +00:00
renovate[bot]
bda67fc879 chore(deps): update dependency @types/lodash to v4.14.198 2023-09-05 22:15:21 +00:00
Tonye Jack
5a5d398e5f chore: Update sync-release-version.yml (#1537)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2023-09-04 22:11:32 +00:00
tj-actions[bot]
f699bde5ad Upgraded to v39 (#1536)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2023-09-04 21:46:56 +00:00
Tonye Jack
48566bbcc2 upgrade: nodejs to v20 (#1535) 2023-09-04 15:29:37 -06:00
renovate[bot]
d68a6666be chore(deps): lock file maintenance 2023-09-04 21:10:22 +00:00
tj-actions[bot]
07660d51a9 Upgraded to v38.2.2 (#1533)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2023-09-04 20:54:35 +00:00
Tonye Jack
632c84dcca Update README.md 2023-09-04 14:42:58 -06:00
renovate[bot]
1aee3621b1 chore(deps): lock file maintenance 2023-09-04 20:19:43 +00:00
Tonye Jack
8d335b7b7d fix: bug with outputs when json is set to true (#1531)
Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-04 20:03:32 +00:00
renovate[bot]
fd460fa3ba chore(deps): update typescript-eslint monorepo to v6.6.0 2023-09-04 18:30:15 +00:00
renovate[bot]
5b84ed26a3 chore(deps): update actions/checkout action to v4 (#1527)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-04 13:21:19 +00:00
renovate[bot]
e03c026bf4 chore(deps): lock file maintenance 2023-09-04 02:06:29 +00:00
renovate[bot]
5704310356 chore(deps): update dependency @types/node to v20.5.9 2023-09-02 23:52:01 +00:00
renovate[bot]
c922361eb2 chore(deps): update dependency @types/node to v20.5.8 2023-09-01 21:02:17 +00:00
tj-actions[bot]
48576e6584 Upgraded to v38.2.1 (#1523)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2023-09-01 20:46:15 +00:00
renovate[bot]
79d644d1a2 chore(deps): lock file maintenance 2023-09-01 20:30:38 +00:00
Tonye Jack
2f7246cb26 chore: update warning message (#1521)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
Co-authored-by: GitHub Action <action@github.com>
2023-09-01 14:07:33 -06:00
Tonye Jack
8476756ae3 fix: bug matching patterns (#1520)
Co-authored-by: GitHub Action <action@github.com>
2023-09-01 19:49:08 +00:00
dependabot[bot]
d90c240f2a chore(deps): bump test/demo from 8bbc726 to 5dfac2e (#1518)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-01 07:30:11 -06:00
renovate[bot]
3be651e99d chore(deps): lock file maintenance 2023-09-01 05:09:43 +00:00
Tonye Jack
4fac98a656 Deleted .github/ISSUE_TEMPLATE/feature_request.yaml 2023-08-31 19:07:44 -06:00
Tonye Jack
bed56b29b8 Deleted .github/ISSUE_TEMPLATE/bug_report.yaml 2023-08-31 19:06:17 -06:00
Tonye Jack
2338e28eef Update bug_report.yaml 2023-08-31 18:14:10 -06:00
Tonye Jack
d4eb53db66 Update bug_report.yaml 2023-08-31 18:12:04 -06:00
Tonye Jack
8f777bbc0d Update bug_report.yaml 2023-08-31 18:10:16 -06:00
Tonye Jack
7d256b941a Update bug_report.yaml 2023-08-31 18:08:46 -06:00
Tonye Jack
c3ceccf9bc Delete FUNDING.yml 2023-08-30 19:50:24 -06:00
renovate[bot]
c89928824f chore(deps): lock file maintenance 2023-08-31 01:09:07 +00:00
tj-actions[bot]
047f654646 Upgraded to v38.2.0 (#1515)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2023-08-30 21:48:14 +00:00
renovate[bot]
0fc9663aa7 chore(deps): update dependency @types/uuid to v9.0.3 (#1512)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2023-08-30 15:10:05 -06:00
tj-actions[bot]
50f623482f Updated README.md (#1514)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2023-08-30 15:09:09 -06:00
Tonye Jack
2e0f79f8b6 Update README.md 2023-08-30 15:02:51 -06:00
tj-actions[bot]
308cb3daf9 Updated README.md (#1513)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2023-08-30 14:56:35 -06:00
Tonye Jack
f1b3c2fa8b feat: add support for failing on error (#1511)
Co-authored-by: GitHub Action <action@github.com>
2023-08-30 14:51:36 -06:00
tj-actions[bot]
2f6d66af9d Updated README.md (#1510)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2023-08-30 17:41:36 +00:00
Tonye Jack
ef21b84507 Update README.md 2023-08-30 11:27:45 -06:00
Tonye Jack
c9dd6721cf Update README.md 2023-08-30 11:23:44 -06:00
renovate[bot]
428519788b chore(deps): update dependency prettier to v3.0.3 2023-08-29 16:09:38 +00:00
renovate[bot]
522df62704 chore(deps): update dependency eslint-plugin-github to v4.10.0 2023-08-29 00:54:55 +00:00
renovate[bot]
d35b677f4b chore(deps): update typescript-eslint monorepo to v6.5.0 2023-08-28 18:57:32 +00:00
GitHub Action
b1c183b83c Added missing changes and modified dist assets. 2023-08-28 15:44:10 +00:00
renovate[bot]
7555f14f91 fix(deps): update dependency yaml to v2.3.2 2023-08-28 15:44:10 +00:00
renovate[bot]
bc2a793022 chore(deps): lock file maintenance 2023-08-28 00:52:59 +00:00
tj-actions[bot]
a40e52b504 Upgraded to v38.1.3 (#1503)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2023-08-26 20:51:29 +00:00
renovate[bot]
c860b5c47f chore(deps): update tj-actions/release-tagger action to v4 (#1502)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-26 14:32:03 -06:00
Tonye Jack
2f8b80270f chore: update warning message (#1500)
Co-authored-by: GitHub Action <action@github.com>
2023-08-26 14:08:40 -06:00
renovate[bot]
d01e38ae60 chore(deps): lock file maintenance 2023-08-26 03:38:30 +00:00
Tonye Jack
eed6844f8b chore: update submodule (#1498) 2023-08-25 21:18:46 -06:00
Tonye Jack
f6e73eb5b6 chore: update warning message (#1497)
Co-authored-by: GitHub Action <action@github.com>
2023-08-25 21:00:53 -06:00
tj-actions[bot]
3034ed7851 Upgraded to v38.1.1 (#1495)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2023-08-25 21:07:25 +00:00
renovate[bot]
34c9fcc96a chore(deps): update dependency eslint to v8.48.0 2023-08-25 20:53:32 +00:00
tj-actions[bot]
b7f1b7347f Updated README.md (#1493)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2023-08-25 14:29:10 -06:00
Tonye Jack
fc4a224c47 Update README.md 2023-08-25 14:28:36 -06:00
dependabot[bot]
b86b5055c6 chore(deps): bump test/demo from f0065d7 to 8bbc726 (#1492)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-25 04:27:14 +00:00
GitHub Action
c0d418d2f4 Added missing changes and modified dist assets. 2023-08-24 23:26:13 +00:00
renovate[bot]
2cd89433de chore(deps): lock file maintenance 2023-08-24 23:26:13 +00:00
renovate[bot]
6cb2857ef0 chore(deps): update dependency @types/node to v20.5.6 2023-08-24 22:44:39 +00:00
renovate[bot]
716bc48e21 chore(deps): update dependency typescript to v5.2.2 2023-08-24 19:32:03 +00:00
renovate[bot]
6afd248b18 chore(deps): update dependency jest to v29.6.4 2023-08-24 16:22:35 +00:00
Tonye Jack
8e62bee92f Updated .github/FUNDING.yml 2023-08-23 21:50:47 -06:00
Tonye Jack
02ce009f42 Updated .github/FUNDING.yml 2023-08-23 21:48:07 -06:00
tj-actions[bot]
88a8df65a2 Updated README.md (#1486)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2023-08-24 03:14:01 +00:00
tj-actions[bot]
5c42e98b8f Updated README.md (#1485)
Co-authored-by: repo-ranger[bot] <repo-ranger[bot]@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2023-08-23 20:59:02 -06:00
renovate[bot]
fd5abe1ac5 chore(deps): update tj-actions/auto-doc action to v3 (#1484)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-24 02:53:09 +00:00
tj-actions[bot]
088d89c918 Updated README.md (#1483)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2023-08-24 02:33:06 +00:00
Tonye Jack
8299ae07ec Update update-readme.yml 2023-08-23 20:15:29 -06:00
Tonye Jack
fd8ad0b934 Update update-readme.yml 2023-08-23 20:13:54 -06:00
tj-actions[bot]
2fc6aa80df Upgraded to v38.1.0 (#1482)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2023-08-23 23:06:36 +00:00
dependabot[bot]
1c26215f3f chore(deps): bump test/demo from e168fac to f0065d7 (#1481)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-23 22:40:11 +00:00
dependabot[bot]
7b1e1540e2 chore(deps-dev): bump @types/node from 20.5.3 to 20.5.4 (#1480)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-23 21:46:49 +00:00
Tonye Jack
02010edac3 chore: move submodule update to dependabot and remove unused workflow (#1478) 2023-08-23 15:09:57 -06:00
tj-actions[bot]
e4e76943d6 Updated README.md (#1477)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2023-08-23 15:05:35 -06:00
Tonye Jack
569361586a feat: add support for fetching additional history for submodules (#1476)
Co-authored-by: GitHub Action <action@github.com>
2023-08-23 15:04:44 -06:00
renovate[bot]
785218258b chore(deps): lock file maintenance 2023-08-23 05:18:13 +00:00
tj-actions[bot]
0b45bc64c2 Upgraded to v38 (#1474)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2023-08-22 22:59:10 -06:00
Tonye Jack
17f3fec1ed fix: error getting diff for submodules (#1473)
Co-authored-by: GitHub Action <action@github.com>
2023-08-22 22:26:07 -06:00
Tonye Jack
52dbf3e3cf chore: update test (#1469)
Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2023-08-23 04:06:23 +00:00
renovate[bot]
0a814e4372 chore(deps): update dependency @types/jest to v29.5.4 (#1472)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-22 13:53:55 -06:00
Tonye Jack
fc63326544 fix: bug with locating the previous tag (#1470)
Co-authored-by: GitHub Action <action@github.com>
2023-08-22 13:41:54 -06:00
renovate[bot]
18bacaab15 chore(deps): update dependency @types/node to v20.5.3 (#1467)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-22 13:41:13 -06:00
tj-actions[bot]
e8f12786b4 Updated README.md (#1466)
Co-authored-by: repo-ranger[bot] <repo-ranger[bot]@users.noreply.github.com>
2023-08-21 22:42:43 -06:00
Tonye Jack
8789204f97 feat: add support for including matching changed files when dir_names is set to true (#1464)
Co-authored-by: tj-actions[bot] <109116665+tj-actions-bot@users.noreply.github.com>
Co-authored-by: GitHub Action <action@github.com>
2023-08-22 03:11:59 +00:00
Tonye Jack
819fb64520 chore: update .eslintrc.json (#1465) 2023-08-21 16:11:26 -06:00
renovate[bot]
31003b45e6 chore(deps): update typescript-eslint monorepo to v6.4.1 (#1463)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-21 19:33:34 +00:00
renovate[bot]
1f04b16682 chore(deps): update dependency jest to v29.6.3 (#1462)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-21 16:43:07 +00:00
renovate[bot]
0a8b04e3e3 chore(deps): lock file maintenance (#1461)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: GitHub Action <action@github.com>
2023-08-21 01:48:26 +00:00
Tonye Jack
f8b4039d96 Update README.md 2023-08-18 19:52:10 -06:00
renovate[bot]
6da496e2f9 chore(deps): update dependency @types/node to v20.5.1 (#1460)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-18 19:53:36 +00:00
renovate[bot]
68d38a3f16 chore(deps): update actions/setup-node action to v3.8.1 (#1459)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-17 17:55:12 +00:00
Tonye Jack
0e8eddfd8c Update README.md 2023-08-16 19:09:51 -06:00
tj-actions[bot]
3645cf9fc3 Upgraded to v37.6.1 (#1458)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2023-08-16 16:45:15 +00:00
renovate[bot]
a0585ff990 chore(deps): update dependency prettier to v3.0.2 (#1457)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: GitHub Action <action@github.com>
2023-08-15 17:37:46 +00:00
renovate[bot]
ec3a2a3b3b chore(deps): update typescript-eslint monorepo to v6.4.0 (#1456)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-14 19:38:44 +00:00
renovate[bot]
24e2a6fb86 chore(deps): update actions/setup-node action to v3.8.0 (#1455)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-14 13:22:55 +00:00
renovate[bot]
1144bc6587 chore(deps): lock file maintenance (#1454)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-14 02:32:29 +00:00
renovate[bot]
fa84d9471e chore(deps): update dependency @types/node to v20.5.0 (#1453)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-13 21:41:48 +00:00
renovate[bot]
71dfd0dc2e chore(deps): update dependency @types/node to v20.4.10 (#1452)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-11 20:07:54 +00:00
renovate[bot]
b941520afb chore(deps): update dependency eslint to v8.47.0 (#1451)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-11 17:39:21 +00:00
renovate[bot]
be110124f6 chore(deps): lock file maintenance (#1450)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-11 04:48:12 +00:00
Tonye Jack
927363397d Update README.md 2023-08-09 18:30:47 -06:00
renovate[bot]
9dc097cfe5 chore(deps): update dependency @types/lodash to v4.14.197 (#1446)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-09 23:12:12 +00:00
renovate[bot]
e3b0c8a681 chore(deps): update dependency @types/node to v20.4.9 (#1444)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-08 22:05:23 +00:00
Tonye Jack
a62be95af3 chore: fix typo 2023-08-08 10:15:34 -06:00
Tonye Jack
a2e707696a Update README.md 2023-08-08 10:14:26 -06:00
renovate[bot]
f267068b02 chore(deps): update typescript-eslint monorepo to v6.3.0 (#1442)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-07 18:34:07 +00:00
tj-actions[bot]
7f0849be06 Upgraded to v37.6.0 (#1441)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2023-08-07 06:28:07 +00:00
38 changed files with 32669 additions and 8835 deletions

View File

@@ -187,6 +187,27 @@
"contributions": [
"doc"
]
},
{
"login": "V0lantis",
"name": "Arthur",
"avatar_url": "https://avatars.githubusercontent.com/u/37664438?v=4",
"profile": "https://arthurvolant.com",
"contributions": [
"bug",
"code"
]
},
{
"login": "rodrigorfk",
"name": "Rodrigo Fior Kuntzer",
"avatar_url": "https://avatars.githubusercontent.com/u/1995033?v=4",
"profile": "https://github.com/rodrigorfk",
"contributions": [
"code",
"test",
"bug"
]
}
],
"contributorsPerLine": 7,
@@ -195,5 +216,6 @@
"repoType": "github",
"repoHost": "https://github.com",
"skipCi": true,
"commitConvention": "angular"
"commitConvention": "angular",
"commitType": "docs"
}

4
.codacy.yml Normal file
View File

@@ -0,0 +1,4 @@
---
exclude_paths:
- "*.md"
- "dist/**"

View File

@@ -1,4 +1,5 @@
dist/
lib/
node_modules/
jest.config.js
jest.config.js
coverage/

View File

@@ -5,7 +5,8 @@
"github"
],
"extends": [
"plugin:github/recommended"
"plugin:github/recommended",
"plugin:prettier/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {

12
.github/FUNDING.yml vendored
View File

@@ -1,12 +0,0 @@
# These are supported funding model platforms
github: jackton1
patreon: # Replace with a single Patreon username
open_collective: tj-actions
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: []

View File

@@ -1,98 +0,0 @@
name: 🐞 Bug
description: Create a report to help us improve
title: "[BUG] <title>"
labels: [bug, needs triage]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!
- type: checkboxes
attributes:
label: Is there an existing issue for this?
description: Please search to see if an issue already exists for the bug you encountered.
options:
- label: I have searched the existing issues
required: true
- type: checkboxes
attributes:
label: Does this issue exist in the latest version?
description: Please view all releases to confirm that this issue hasn't already been fixed.
options:
- label: I'm using the latest release
required: true
- type: textarea
id: what-happened
attributes:
label: Describe the bug?
description: A clear and concise description of what the bug is
placeholder: Tell us what you see!
validations:
required: true
- type: textarea
id: reproduce
attributes:
label: To Reproduce
description: Steps to reproduce the behavior?
placeholder: |
1. In this environment...
2. With this config...
3. Run '...'
4. See error...
validations:
required: true
- type: dropdown
id: os
attributes:
label: What OS are you seeing the problem on?
multiple: true
options:
- all
- ubuntu-latest or ubuntu-20.04
- ubuntu-18.04
- macos-latest or macos-10.15
- macos-11
- windows-latest or windows-2019
- windows-2016
validations:
required: true
- type: textarea
id: expected
attributes:
label: Expected behavior?
description: A clear and concise description of what you expected to happen.
placeholder: Tell us what you expected!
validations:
required: true
- type: textarea
id: logs
attributes:
label: Relevant log output
description: Please copy and paste any relevant log output which is obtained after enabling debug logging. This will be automatically formatted into code, so no need for backticks.
placeholder: |
1. Re-running the workflow with debug logging enabled.
2. Copy or download the log archive.
3. Paste the contents here or upload the file in a subsequent comment.
render: shell
validations:
required: true
- type: textarea
attributes:
label: Anything else?
description: |
Links? or References?
Anything that will give us more context about the issue you are encountering!
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
validations:
required: false
- type: checkboxes
id: terms
attributes:
label: Code of Conduct
description: By submitting this issue, you agree to follow our [Code of Conduct](../blob/main/CODE_OF_CONDUCT.md)
options:
- label: I agree to follow this project's Code of Conduct
required: true

View File

@@ -1,59 +0,0 @@
name: Feature request
description: Suggest an idea for this project
title: "[Feature] <title>"
labels: [enhancement]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this feature request!
- type: checkboxes
attributes:
label: Is this feature missing in the latest version?
description: Please upgrade to the latest version to verify that this feature is still missing.
options:
- label: I'm using the latest release
required: true
- type: textarea
id: what-happened
attributes:
label: Is your feature request related to a problem? Please describe.
description: |
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
placeholder: Tell us what you see!
validations:
required: true
- type: textarea
id: requests
attributes:
label: Describe the solution you'd like?
description: A clear and concise description of what you want to happen.
validations:
required: true
- type: textarea
id: alternative
attributes:
label: Describe alternatives you've considered?
description: A clear and concise description of any alternative solutions or features you've considered.
validations:
required: false
- type: textarea
attributes:
label: Anything else?
description: |
Links? or References?
Add any other context or screenshots about the feature request here.
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
validations:
required: false
- type: checkboxes
id: terms
attributes:
label: Code of Conduct
description: By submitting this issue, you agree to follow our [Code of Conduct](../blob/main/CODE_OF_CONDUCT.md)
options:
- label: I agree to follow this project's Code of Conduct
required: true

View File

@@ -15,3 +15,10 @@ updates:
open-pull-requests-limit: 10
labels:
- "merge when passing"
- package-ecosystem: gitsubmodule
directory: /
schedule:
interval: daily
open-pull-requests-limit: 10
labels:
- "merge when passing"

View File

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

View File

@@ -29,7 +29,7 @@ jobs:
steps:
# Checkout the repository to the GitHub Actions runner
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
# Execute Codacy Analysis CLI and generate a SARIF output with the security issues identified during the analysis
- name: Run Codacy Analysis CLI
@@ -51,6 +51,6 @@ jobs:
# Upload the SARIF file generated in the previous step
- name: Upload SARIF results file
continue-on-error: true
uses: github/codeql-action/upload-sarif@v2
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: results.sarif

View File

@@ -38,11 +38,11 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -56,7 +56,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3
# Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
@@ -69,6 +69,6 @@ jobs:
# ./location_of_script_within_repo/buildscript.sh
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"

View File

@@ -1,13 +0,0 @@
name: Greetings
on: [pull_request_target, issues]
jobs:
greeting:
runs-on: ubuntu-latest
steps:
- uses: actions/first-interaction@v1
with:
repo-token: ${{ secrets.GITHUB_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."

174
.github/workflows/issue-comment-test.yml vendored Normal file
View File

@@ -0,0 +1,174 @@
name: Issue Comment Test
on:
issue_comment:
jobs:
pr_commented:
# This job only runs for pull request comments
name: PR comment
if: ${{ github.event.issue.pull_request }}
runs-on: ubuntu-latest
steps:
- run: |
echo A comment on PR $NUMBER
env:
NUMBER: ${{ github.event.issue.number }}
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- name: Run changed-files with defaults
id: changed-files
uses: ./
- name: Show output
run: |
echo '${{ toJSON(steps.changed-files.outputs) }}'
shell:
bash
- name: Run changed-files for old new filenames test rename
id: changed-files-all-old-new-renamed-files
uses: ./
with:
base_sha: d1c0ee4
sha: 4d04215
fetch_depth: 60000
include_all_old_new_renamed_files: true
- name: Show output
run: |
echo '${{ toJSON(steps.changed-files-all-old-new-renamed-files.outputs) }}'
shell:
bash
- name: Show output
run: |
echo '${{ toJSON(steps.changed-files-all-old-new-renamed-files.outputs) }}'
shell:
bash
- name: Check all_old_new_renamed_files output on non windows platform
if: "!contains(steps.changed-files-all-old-new-renamed-files.outputs.all_old_new_renamed_files, 'test/test rename 1.txt,test/test rename-1.txt') && runner.os != 'Windows'"
run: |
echo "Invalid output: Expected to include (test/test rename 1.txt,test/test rename-1.txt) got (${{ steps.changed-files-all-old-new-renamed-files.outputs.all_old_new_renamed_files }})"
exit 1
shell:
bash
- name: Check all_old_new_renamed_files output on windows platform
if: "!contains(steps.changed-files-all-old-new-renamed-files.outputs.all_old_new_renamed_files, 'test\\test rename 1.txt,test\\test rename-1.txt') && runner.os == 'Windows'"
run: |
echo "Invalid output: Expected to not include (test\\test rename 1.txt,test\\test rename-1.txt) got (${{ steps.changed-files-all-old-new-renamed-files.outputs.all_old_new_renamed_files }})"
exit 1
shell:
bash
- name: Check the renamed_files output on non windows platform
if: "!contains(steps.changed-files-all-old-new-renamed-files.outputs.renamed_files, 'test/test rename-1.txt') && runner.os != 'Windows'"
run: |
echo "Invalid output: Expected to include (test/test rename-1.txt) got (${{ steps.changed-files-all-old-new-renamed-files.outputs.renamed_files }})"
exit 1
shell:
bash
- name: Check the renamed_files output on windows platform
if: "!contains(steps.changed-files-all-old-new-renamed-files.outputs.renamed_files, 'test\\test rename-1.txt') && runner.os == 'Windows'"
run: |
echo "Invalid output: Expected to not include (test\\test rename-1.txt) got (${{ steps.changed-files-all-old-new-renamed-files.outputs.renamed_files }})"
exit 1
shell:
bash
issue_commented:
# This job only runs for issue comments
name: Issue comment
if: ${{ !github.event.issue.pull_request }}
runs-on: ubuntu-latest
steps:
- run: |
echo A comment on issue $NUMBER
env:
NUMBER: ${{ github.event.issue.number }}
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- name: Run changed-files with defaults
id: changed-files
uses: ./
- name: Show output
run: |
echo '${{ toJSON(steps.changed-files.outputs) }}'
shell:
bash
- name: Run changed-files for old new filenames test rename
id: changed-files-all-old-new-renamed-files
uses: ./
with:
base_sha: d1c0ee4
sha: 4d04215
fetch_depth: 60000
include_all_old_new_renamed_files: true
- name: Show output
run: |
echo '${{ toJSON(steps.changed-files-all-old-new-renamed-files.outputs) }}'
shell:
bash
- name: Show output
run: |
echo '${{ toJSON(steps.changed-files-all-old-new-renamed-files.outputs) }}'
shell:
bash
- name: Check all_old_new_renamed_files output on non windows platform
if: "!contains(steps.changed-files-all-old-new-renamed-files.outputs.all_old_new_renamed_files, 'test/test rename 1.txt,test/test rename-1.txt') && runner.os != 'Windows'"
run: |
echo "Invalid output: Expected to include (test/test rename 1.txt,test/test rename-1.txt) got (${{ steps.changed-files-all-old-new-renamed-files.outputs.all_old_new_renamed_files }})"
exit 1
shell:
bash
- name: Check all_old_new_renamed_files output on windows platform
if: "!contains(steps.changed-files-all-old-new-renamed-files.outputs.all_old_new_renamed_files, 'test\\test rename 1.txt,test\\test rename-1.txt') && runner.os == 'Windows'"
run: |
echo "Invalid output: Expected to not include (test\\test rename 1.txt,test\\test rename-1.txt) got (${{ steps.changed-files-all-old-new-renamed-files.outputs.all_old_new_renamed_files }})"
exit 1
shell:
bash
- name: Check the renamed_files output on non windows platform
if: "!contains(steps.changed-files-all-old-new-renamed-files.outputs.renamed_files, 'test/test rename-1.txt') && runner.os != 'Windows'"
run: |
echo "Invalid output: Expected to include (test/test rename-1.txt) got (${{ steps.changed-files-all-old-new-renamed-files.outputs.renamed_files }})"
exit 1
shell:
bash
- name: Check the renamed_files output on windows platform
if: "!contains(steps.changed-files-all-old-new-renamed-files.outputs.renamed_files, 'test\\test rename-1.txt') && runner.os == 'Windows'"
run: |
echo "Invalid output: Expected to not include (test\\test rename-1.txt) got (${{ steps.changed-files-all-old-new-renamed-files.outputs.renamed_files }})"
exit 1
shell:
bash

View File

@@ -16,7 +16,7 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0

View File

@@ -8,13 +8,13 @@ on:
jobs:
changed-files:
name: Get changes
name: Get changed files
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
matrix: ${{ steps.changed-files.outputs.all_changed_files }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get changed files
@@ -23,22 +23,22 @@ jobs:
with:
json: true
quotepath: false
escape_json: false
- name: List all changed files
run: echo '${{ steps.changed-files.outputs.all_changed_files }}'
- id: set-matrix
run: echo "matrix={\"files\":${{ steps.changed-files.outputs.all_changed_files }}}" >> "$GITHUB_OUTPUT"
matrix-job:
name: Run Matrix Job
runs-on: ubuntu-latest
needs: [changed-files]
strategy:
matrix: ${{ fromJSON(needs.changed-files.outputs.matrix) }}
matrix:
files: ${{ fromJSON(needs.changed-files.outputs.matrix) }}
max-parallel: 4
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Test
run: |
echo ${{ matrix.files }}

View File

@@ -1,29 +0,0 @@
on:
workflow_dispatch:
jobs:
sync:
name: Submodule Sync
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
- name: Git Sumbodule Update
run: |
git pull --recurse-submodules
git submodule update --remote --recursive
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5.0.2
with:
title: "Updated submodule"
labels: "merge when passing"
branch: "chore/update-submodule"
commit-message: "Updated submodule"
body: "Updated submodule"
token: ${{ secrets.PAT_TOKEN }}

View File

@@ -8,11 +8,11 @@ jobs:
update-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run release-tagger
uses: tj-actions/release-tagger@v3
uses: tj-actions/release-tagger@v4
- name: Sync release version.
uses: tj-actions/sync-release-version@v13
id: sync-release-version
@@ -21,6 +21,14 @@ jobs:
only_major: true
paths: |
README.md
- name: Sync release package version.
uses: tj-actions/sync-release-version@v13
id: sync-release-package-version
with:
pattern: '"version": "'
strip_prefix: "v"
paths: |
package.json
- name: Run git-cliff
uses: tj-actions/git-cliff@v1
- name: Create Pull Request

File diff suppressed because it is too large Load Diff

View File

@@ -9,12 +9,15 @@ jobs:
sync-assets:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run auto-doc
uses: tj-actions/auto-doc@v2
uses: tj-actions/auto-doc@v3
with:
use_code_blocks: true
use_major_version: true
- name: Run remark
uses: tj-actions/remark@v3

2
.nvmrc
View File

@@ -1 +1 @@
16
20

1065
HISTORY.md

File diff suppressed because it is too large Load Diff

727
README.md

File diff suppressed because it is too large Load Diff

32
SECURITY.md Normal file
View File

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

View File

@@ -4,11 +4,11 @@ author: tj-actions
inputs:
separator:
description: "Split character for output strings"
description: "Split character for output strings."
required: false
default: " "
include_all_old_new_renamed_files:
description: "Include `all_old_new_renamed_files` output. Note this can generate a large output See: [#501](https://github.com/tj-actions/changed-files/issues/501)."
description: "Include `all_old_new_renamed_files` output. Note this can generate a large output See: #501."
required: false
default: "false"
old_new_separator:
@@ -24,11 +24,13 @@ inputs:
required: false
default: ""
files_from_source_file_separator:
description: 'Separator used to split the `files_from_source_file` input'
description: "Separator used to split the `files_from_source_file` input."
default: "\n"
required: false
files:
description: "File and directory patterns used to detect changes (Defaults to the entire repo if unset) **NOTE:** Multiline file/directory patterns should not include quotes."
description: |
File and directory patterns used to detect changes (Defaults to the entire repo if unset).
NOTE: Multiline file/directory patterns should not include quotes.
required: false
default: ""
files_separator:
@@ -40,7 +42,7 @@ inputs:
required: false
default: ""
files_yaml_from_source_file:
description: "Source file(s) used to populate the `files_yaml` input. [Example](https://github.com/tj-actions/changed-files/blob/main/test/changed-files.yml)"
description: "Source file(s) used to populate the `files_yaml` input. Example: https://github.com/tj-actions/changed-files/blob/main/test/changed-files.yml"
required: false
default: ""
files_yaml_from_source_file_separator:
@@ -52,7 +54,7 @@ inputs:
required: false
default: ""
files_ignore_yaml_from_source_file:
description: "Source file(s) used to populate the `files_ignore_yaml` input. [Example](https://github.com/tj-actions/changed-files/blob/main/test/changed-files.yml)"
description: "Source file(s) used to populate the `files_ignore_yaml` input. Example: https://github.com/tj-actions/changed-files/blob/main/test/changed-files.yml"
required: false
default: ""
files_ignore_yaml_from_source_file_separator:
@@ -60,7 +62,7 @@ inputs:
default: "\n"
required: false
files_ignore:
description: "Ignore changes to these file(s) **NOTE:** Multiline file/directory patterns should not include quotes."
description: "Ignore changes to these file(s). NOTE: Multiline file/directory patterns should not include quotes."
required: false
default: ""
files_ignore_separator:
@@ -76,10 +78,10 @@ inputs:
default: "\n"
required: false
sha:
description: "Specify a different commit SHA used for comparing changes"
description: "Specify a different commit SHA or branch used for comparing changes"
required: false
base_sha:
description: "Specify a different base commit SHA used for comparing changes"
description: "Specify a different base commit SHA or branch used for comparing changes"
required: false
since:
description: "Get changed files for commits whose timestamp is older than the given time."
@@ -94,16 +96,16 @@ inputs:
required: false
default: "."
quotepath:
description: "Use non-ascii characters to match files and output the filenames completely verbatim by setting this to `false`"
description: "Use non-ASCII characters to match files and output the filenames completely verbatim by setting this to `false`"
default: "true"
required: false
diff_relative:
description: "Exclude changes outside the current directory and show path names relative to it. **NOTE:** This requires you to specify the top level directory via the `path` input."
description: "Exclude changes outside the current directory and show path names relative to it. NOTE: This requires you to specify the top-level directory via the `path` input."
required: false
default: "true"
dir_names:
default: "false"
description: "Output unique changed directories instead of filenames. **NOTE:** This returns `.` for changed files located in the current working directory which defaults to `$GITHUB_WORKSPACE`."
description: "Output unique changed directories instead of filenames. NOTE: This returns `.` for changed files located in the current working directory which defaults to `$GITHUB_WORKSPACE`."
required: false
dir_names_max_depth:
description: "Limit the directory output to a maximum depth e.g `test/test1/test2` with max depth of `2` returns `test/test1`."
@@ -112,8 +114,20 @@ inputs:
description: "Exclude the current directory represented by `.` from the output when `dir_names` is set to `true`."
required: false
default: "false"
dir_names_include_files:
description: "File and directory patterns to include in the output when `dir_names` is set to `true`. NOTE: This returns only the matching files and also the directory names."
required: false
default: ""
dir_names_include_files_separator:
description: "Separator used to split the `dir_names_include_files` input"
default: "\n"
required: false
dir_names_deleted_files_include_only_deleted_dirs:
description: "Include only directories that have been deleted as opposed to directory names of files that have been deleted in the `deleted_files` output when `dir_names` is set to `true`."
required: false
default: "false"
json:
description: "Output list of changed files in a JSON formatted string which can be used for matrix jobs."
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"
required: false
default: "false"
escape_json:
@@ -121,11 +135,17 @@ inputs:
required: false
default: "true"
fetch_depth:
description: "Depth of additional branch history fetched. **NOTE**: This can be adjusted to resolve errors with insufficient history."
description: "Depth of additional branch history fetched. NOTE: This can be adjusted to resolve errors with insufficient history."
required: false
default: "50"
skip_initial_fetch:
description: "Skip the initial fetch to improve performance for shallow repositories. **NOTE**: This could lead to errors with missing history and the intended use is limited to when you've fetched the history necessary to perform the diff."
description: |
Skip the initial fetch to improve performance for shallow repositories.
NOTE: This could lead to errors with missing history and the intended use is limited to when you've fetched the history necessary to perform the diff.
required: false
default: "false"
fetch_additional_submodule_history:
description: "Fetch additional history for submodules."
required: false
default: "false"
since_last_remote_commit:
@@ -133,7 +153,7 @@ inputs:
required: false
default: "false"
write_output_files:
description: "Write outputs to the `output_dir` defaults to `.github/outputs` folder. **NOTE:** This creates a `.txt` file by default and a `.json` file if `json` is set to `true`."
description: "Write outputs to the `output_dir` defaults to `.github/outputs` folder. NOTE: This creates a `.txt` file by default and a `.json` file if `json` is set to `true`."
required: false
default: "false"
output_dir:
@@ -153,7 +173,10 @@ inputs:
required: false
default: ""
recover_files:
description: "File and directory patterns used to recover deleted files, defaults to the patterns provided via the `files`, `files_from_source_file`, `files_ignore` and `files_ignore_from_source_file` inputs or all deleted files if no patterns are provided."
description: |
File and directory patterns used to recover deleted files,
defaults to the patterns provided via the `files`, `files_from_source_file`, `files_ignore` and `files_ignore_from_source_file` inputs
or all deleted files if no patterns are provided.
required: false
default: ""
recover_files_separator:
@@ -169,13 +192,25 @@ inputs:
default: "\n"
required: false
token:
description: "Github token used to fetch changed files from Github's API."
description: "GitHub token used to fetch changed files from Github's API."
required: false
default: ${{ github.token }}
api_url:
description: "Github API URL."
required: false
default: ${{ github.api_url }}
fail_on_initial_diff_error:
description: "Fail when the initial diff fails."
required: false
default: "false"
fail_on_submodule_diff_error:
description: "Fail when the submodule diff fails."
required: false
default: "false"
negation_patterns_first:
description: "Apply the negation patterns first. NOTE: This affects how changed files are matched."
required: false
default: "false"
outputs:
added_files:
@@ -223,11 +258,11 @@ outputs:
all_changed_files_count:
description: "Returns the number of `all_changed_files`"
any_changed:
description: "Returns `true` when any of the filenames provided using the `files*` or `files_ignore*` inputs has changed. i.e. *using 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 has changed. i.e. *includes a combination of all added, copied, modified and renamed files (ACMR)*."
only_changed:
description: "Returns `true` when only files provided using the `files*` or `files_ignore*` inputs has changed. i.e. *using 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 has 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. *using 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:
@@ -235,11 +270,11 @@ outputs:
all_modified_files_count:
description: "Returns the number of `all_modified_files`"
any_modified:
description: "Returns `true` when any of the filenames provided using the `files*` or `files_ignore*` inputs has been modified. i.e. *using 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 has been modified. 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)."
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:
@@ -250,9 +285,13 @@ outputs:
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)*"
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)*"
runs:
using: 'node16'
using: 'node20'
main: 'dist/index.js'
branding:

34233
dist/index.js generated vendored

File diff suppressed because one or more lines are too long

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long

152
dist/licenses.txt generated vendored
View File

@@ -71,6 +71,28 @@ The above copyright notice and this permission notice shall be included in all c
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@fastify/busboy
MIT
Copyright Brian White. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
@octokit/auth-token
MIT
The MIT License
@@ -243,16 +265,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
@vercel/ncc
MIT
Copyright 2018 ZEIT, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
before-after-hook
Apache-2.0
Apache License
@@ -552,31 +564,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
is-plain-object
MIT
The MIT License (MIT)
Copyright (c) 2014-2017, Jon Schlinkert.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
lodash
MIT
Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
@@ -653,32 +640,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
node-fetch
MIT
The MIT License (MIT)
Copyright (c) 2016 David Frank
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
once
ISC
The ISC License
@@ -748,9 +709,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
tr46
MIT
tunnel
MIT
The MIT License (MIT)
@@ -776,6 +734,31 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
undici
MIT
MIT License
Copyright (c) Matteo Collina and Undici contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
universal-user-agent
ISC
# [ISC License](https://spdx.org/licenses/ISC)
@@ -800,47 +783,6 @@ The above copyright notice and this permission notice shall be included in all c
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
webidl-conversions
BSD-2-Clause
# The BSD 2-Clause License
Copyright (c) 2014, Domenic Denicola
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
whatwg-url
MIT
The MIT License (MIT)
Copyright (c) 20152016 Sebastian Mayr
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
wrappy
ISC
The ISC License

View File

@@ -1,6 +1,6 @@
{
"name": "@tj-actions/changed-files",
"version": "37.4.0",
"version": "40.2.2",
"description": "Github action to retrieve all (added, copied, modified, deleted, renamed, type changed, unmerged, unknown) files and directories.",
"main": "lib/main.js",
"publishConfig": {
@@ -8,10 +8,10 @@
},
"scripts": {
"build": "tsc",
"format": "prettier --write **/*.ts",
"format-check": "prettier --check **/*.ts",
"lint": "eslint src/**/*.ts",
"lint:fix": "eslint --fix src/**/*.ts",
"format": "prettier --write src/*.ts src/**/*.ts",
"format-check": "prettier --check src/*.ts src/**/*.ts",
"lint": "eslint src/*.ts src/**/*.ts --max-warnings 0",
"lint:fix": "eslint --fix src/*.ts src/**/*.ts",
"package": "ncc build lib/main.js --source-map --license licenses.txt",
"test": "jest --coverage",
"all": "yarn build && yarn format && yarn lint && yarn package && yarn test"
@@ -34,8 +34,8 @@
"dependencies": {
"@actions/core": "^1.10.0",
"@actions/exec": "^1.1.1",
"@actions/github": "^5.1.1",
"@octokit/rest": "^19.0.13",
"@actions/github": "^6.0.0",
"@octokit/rest": "^20.0.1",
"lodash": "^4.17.21",
"micromatch": "^4.0.5",
"yaml": "^2.3.1"
@@ -48,11 +48,12 @@
"@types/uuid": "^9.0.2",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"@vercel/ncc": "^0.36.1",
"@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",
"jest": "^29.5.0",
"prettier": "^3.0.0",
"ts-jest": "^29.1.0",

View File

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

View File

@@ -74,6 +74,7 @@ describe('utils test', () => {
// Tests that the function returns the correct dirname when the relative path is a Windows drive root and excludeCurrentDir is true
it('test_windows_drive_root_and_exclude_current_dir_is_true', () => {
mockedPlatform('win32')
const result = getDirnameMaxDepth({
relativePath: 'C:\\',
dirNamesMaxDepth: 1,
@@ -107,6 +108,7 @@ describe('utils test', () => {
// Tests that getDirnameMaxDepth returns the correct output for a Windows UNC root path
it('test_windows_unc_root', () => {
mockedPlatform('win32')
const input = {
relativePath: '\\hello',
dirNamesMaxDepth: 2,
@@ -118,6 +120,7 @@ describe('utils test', () => {
// Tests that getDirnameMaxDepth returns an empty string when given a Windows UNC root and excludeCurrentDir is true
it('test_windows_unc_root_exclude_current_dir', () => {
mockedPlatform('win32')
const relativePath = '\\hello'
const result = getDirnameMaxDepth({
relativePath,
@@ -152,6 +155,7 @@ describe('utils test', () => {
// Tests that the function returns the correct dirname for a valid Windows UNC root path
it('test windows unc root path', () => {
mockedPlatform('win32')
expect(getDirname('\\helloworld')).toEqual('.')
})
@@ -162,6 +166,7 @@ describe('utils test', () => {
// Tests that the function returns the correct dirname for a Windows UNC root path with a trailing slash
it('test windows unc root path with trailing slash', () => {
mockedPlatform('win32')
expect(getDirname('\\hello\\world\\')).toEqual('.')
})
@@ -172,6 +177,7 @@ describe('utils test', () => {
// Tests that the function returns the correct dirname for a Windows UNC root path with multiple slashes
it('test windows unc root path with multiple slashes', () => {
mockedPlatform('win32')
expect(getDirname('\\hello\\world')).toEqual('.')
})
})
@@ -194,6 +200,15 @@ describe('utils test', () => {
expect(actualOutput).toEqual(expectedOutput)
})
// Tests that forward slashes are normalized on Windows
it('test mixed slashes windows', () => {
mockedPlatform('win32')
const input = 'path/to/file'
const expectedOutput = 'path\\to\\file'
const actualOutput = normalizeSeparators(input)
expect(actualOutput).toEqual(expectedOutput)
})
// Tests that mixed slashes are normalized on Windows
it('test mixed slashes windows', () => {
mockedPlatform('win32')
@@ -221,6 +236,7 @@ describe('utils test', () => {
// Tests that UNC format is preserved on Windows
it('test unc format windows', () => {
mockedPlatform('win32')
const input = '\\\\hello\\world'
const expectedOutput = '\\\\hello\\world'
const actualOutput = normalizeSeparators(input)
@@ -229,6 +245,7 @@ describe('utils test', () => {
// Tests that a drive root is preserved on Windows
it('test drive root windows', () => {
mockedPlatform('win32')
const input = 'C:\\'
const expectedOutput = 'C:\\'
const actualOutput = normalizeSeparators(input)
@@ -236,8 +253,6 @@ describe('utils test', () => {
})
})
// Generated by CodiumAI
describe('getFilteredChangedFiles', () => {
// Tests that the function returns an empty object when allDiffFiles and filePatterns are empty
it('should return an empty object when allDiffFiles and filePatterns are empty', async () => {
@@ -312,7 +327,7 @@ describe('utils test', () => {
})
})
// Tests that the function returns only the files that match the file patterns
// Tests that the function returns only the files that match the file patterns on non windows platforms
it('should return only the files that match the file patterns', async () => {
const allDiffFiles = {
[ChangeTypeEnum.Added]: [
@@ -320,7 +335,7 @@ describe('utils test', () => {
'file2.md',
'file3.txt',
'test/dir/file4.txt',
'/test/dir/file5.txt',
'test/dir/file5.txt',
'dir/file6.md'
],
[ChangeTypeEnum.Copied]: [],
@@ -347,7 +362,44 @@ describe('utils test', () => {
})
})
// Tests that the function returns only the files that match the file patterns with globstar
// Tests that the function returns only the files that match the file patterns on windows
it('should return only the files that match the file patterns on windows', async () => {
mockedPlatform('win32')
const allDiffFiles = {
[ChangeTypeEnum.Added]: [
'file1.txt',
'file2.md',
'file3.txt',
'test\\dir\\file4.txt',
'test\\dir\\file5.txt',
'dir\\file6.md'
],
[ChangeTypeEnum.Copied]: [],
[ChangeTypeEnum.Deleted]: [],
[ChangeTypeEnum.Modified]: [],
[ChangeTypeEnum.Renamed]: [],
[ChangeTypeEnum.TypeChanged]: [],
[ChangeTypeEnum.Unmerged]: [],
[ChangeTypeEnum.Unknown]: []
}
const result = await getFilteredChangedFiles({
allDiffFiles,
filePatterns: ['*.txt']
})
expect(result).toEqual({
[ChangeTypeEnum.Added]: ['file1.txt', 'file3.txt'],
[ChangeTypeEnum.Copied]: [],
[ChangeTypeEnum.Deleted]: [],
[ChangeTypeEnum.Modified]: [],
[ChangeTypeEnum.Renamed]: [],
[ChangeTypeEnum.TypeChanged]: [],
[ChangeTypeEnum.Unmerged]: [],
[ChangeTypeEnum.Unknown]: []
})
})
// Tests that the function returns only the files that match the file patterns with globstar on non windows platforms
it('should return only the files that match the file patterns with globstar', async () => {
const allDiffFiles = {
[ChangeTypeEnum.Added]: [
@@ -355,7 +407,7 @@ describe('utils test', () => {
'file2.md',
'file3.txt',
'test/dir/file4.txt',
'/test/dir/file5.txt',
'test/dir/file5.txt',
'dir/file6.md'
],
[ChangeTypeEnum.Copied]: [],
@@ -375,7 +427,7 @@ describe('utils test', () => {
'file1.txt',
'file3.txt',
'test/dir/file4.txt',
'/test/dir/file5.txt'
'test/dir/file5.txt'
],
[ChangeTypeEnum.Copied]: [],
[ChangeTypeEnum.Deleted]: [],
@@ -387,6 +439,35 @@ describe('utils test', () => {
})
})
// Tests that the function returns only the files that match the file patterns with globstar on windows
it('should return only the files that match the file patterns with globstar on windows', async () => {
mockedPlatform('win32')
const allDiffFiles = {
[ChangeTypeEnum.Added]: ['test\\test rename-1.txt'],
[ChangeTypeEnum.Copied]: [],
[ChangeTypeEnum.Deleted]: [],
[ChangeTypeEnum.Modified]: [],
[ChangeTypeEnum.Renamed]: [],
[ChangeTypeEnum.TypeChanged]: [],
[ChangeTypeEnum.Unmerged]: [],
[ChangeTypeEnum.Unknown]: []
}
const result = await getFilteredChangedFiles({
allDiffFiles,
filePatterns: ['test/**']
})
expect(result).toEqual({
[ChangeTypeEnum.Added]: ['test\\test rename-1.txt'],
[ChangeTypeEnum.Copied]: [],
[ChangeTypeEnum.Deleted]: [],
[ChangeTypeEnum.Modified]: [],
[ChangeTypeEnum.Renamed]: [],
[ChangeTypeEnum.TypeChanged]: [],
[ChangeTypeEnum.Unmerged]: [],
[ChangeTypeEnum.Unknown]: []
})
})
// Tests that the function returns an empty object when there are no files that match the file patterns
it('should return an empty object when there are no files that match the file patterns', async () => {
const allDiffFiles = {

View File

@@ -2,18 +2,122 @@ import * as core from '@actions/core'
import * as github from '@actions/github'
import type {RestEndpointMethodTypes} from '@octokit/rest'
import flatten from 'lodash/flatten'
import mm from 'micromatch'
import * as path from 'path'
import {setOutputsAndGetModifiedAndChangedFilesStatus} from './changedFilesOutput'
import {DiffResult} from './commitSha'
import {Inputs} from './inputs'
import {
canDiffCommits,
getAllChangedFiles,
getDirnameMaxDepth,
getDirNamesIncludeFilesPattern,
getFilteredChangedFiles,
gitRenamedFiles,
gitSubmoduleDiffSHA,
jsonOutput
isWindows,
jsonOutput,
setArrayOutput
} from './utils'
export const processChangedFiles = async ({
filePatterns,
allDiffFiles,
inputs,
yamlFilePatterns,
workingDirectory
}: {
filePatterns: string[]
allDiffFiles: ChangedFiles
inputs: Inputs
yamlFilePatterns: Record<string, string[]>
workingDirectory?: string
}): Promise<void> => {
if (filePatterns.length > 0) {
core.startGroup('changed-files-patterns')
const allFilteredDiffFiles = await getFilteredChangedFiles({
allDiffFiles,
filePatterns
})
core.debug(
`All filtered diff files: ${JSON.stringify(allFilteredDiffFiles)}`
)
await setOutputsAndGetModifiedAndChangedFilesStatus({
allDiffFiles,
allFilteredDiffFiles,
inputs,
filePatterns,
workingDirectory
})
core.info('All Done!')
core.endGroup()
}
if (Object.keys(yamlFilePatterns).length > 0) {
const modifiedKeys: string[] = []
const changedKeys: string[] = []
for (const key of Object.keys(yamlFilePatterns)) {
core.startGroup(`changed-files-yaml-${key}`)
const allFilteredDiffFiles = await getFilteredChangedFiles({
allDiffFiles,
filePatterns: yamlFilePatterns[key]
})
core.debug(
`All filtered diff files for ${key}: ${JSON.stringify(
allFilteredDiffFiles
)}`
)
const {anyChanged, anyModified} =
await setOutputsAndGetModifiedAndChangedFilesStatus({
allDiffFiles,
allFilteredDiffFiles,
inputs,
filePatterns: yamlFilePatterns[key],
outputPrefix: key,
workingDirectory
})
if (anyModified) {
modifiedKeys.push(key)
}
if (anyChanged) {
changedKeys.push(key)
}
core.info('All Done!')
core.endGroup()
}
if (modifiedKeys.length > 0) {
await setArrayOutput({
key: 'modified_keys',
inputs,
value: modifiedKeys
})
}
if (changedKeys.length > 0) {
await setArrayOutput({
key: 'changed_keys',
inputs,
value: changedKeys
})
}
}
if (filePatterns.length === 0 && Object.keys(yamlFilePatterns).length === 0) {
core.startGroup('changed-files-all')
await setOutputsAndGetModifiedAndChangedFilesStatus({
allDiffFiles,
allFilteredDiffFiles: allDiffFiles,
inputs,
workingDirectory
})
core.info('All Done!')
core.endGroup()
}
}
export const getRenamedFiles = async ({
inputs,
workingDirectory,
@@ -51,11 +155,29 @@ export const getRenamedFiles = async ({
)
if (submoduleShaResult.currentSha && submoduleShaResult.previousSha) {
let diff = '...'
if (
!(await canDiffCommits({
cwd: submoduleWorkingDirectory,
sha1: submoduleShaResult.previousSha,
sha2: submoduleShaResult.currentSha,
diff
}))
) {
let message = `Unable to use three dot diff for: ${submodulePath} submodule. Falling back to two dot diff. You can set 'fetch_additional_submodule_history: true' to fetch additional submodule history in order to use three dot diff`
if (inputs.fetchSubmoduleHistory) {
message = `To fetch additional submodule history for: ${submodulePath} you can increase history depth using 'fetch_depth' input`
}
core.info(message)
diff = '..'
}
const submoduleRenamedFiles = await gitRenamedFiles({
cwd: submoduleWorkingDirectory,
sha1: submoduleShaResult.previousSha,
sha2: submoduleShaResult.currentSha,
diff: diffResult.diff,
diff,
oldNewSeparator: inputs.oldNewSeparator,
isSubmodule: true,
parentDir: submodulePath
@@ -98,20 +220,27 @@ export const getAllDiffFiles = async ({
hasSubmodule,
diffResult,
submodulePaths,
outputRenamedFilesAsDeletedAndAdded
outputRenamedFilesAsDeletedAndAdded,
fetchSubmoduleHistory,
failOnInitialDiffError,
failOnSubmoduleDiffError
}: {
workingDirectory: string
hasSubmodule: boolean
diffResult: DiffResult
submodulePaths: string[]
outputRenamedFilesAsDeletedAndAdded: boolean
fetchSubmoduleHistory: boolean
failOnInitialDiffError: boolean
failOnSubmoduleDiffError: boolean
}): Promise<ChangedFiles> => {
const files = await getAllChangedFiles({
cwd: workingDirectory,
sha1: diffResult.previousSha,
sha2: diffResult.currentSha,
diff: diffResult.diff,
outputRenamedFilesAsDeletedAndAdded
outputRenamedFilesAsDeletedAndAdded,
failOnInitialDiffError
})
if (hasSubmodule) {
@@ -130,14 +259,33 @@ export const getAllDiffFiles = async ({
)
if (submoduleShaResult.currentSha && submoduleShaResult.previousSha) {
let diff = '...'
if (
!(await canDiffCommits({
cwd: submoduleWorkingDirectory,
sha1: submoduleShaResult.previousSha,
sha2: submoduleShaResult.currentSha,
diff
}))
) {
let message = `Set 'fetch_additional_submodule_history: true' to fetch additional submodule history for: ${submodulePath}`
if (fetchSubmoduleHistory) {
message = `To fetch additional submodule history for: ${submodulePath} you can increase history depth using 'fetch_depth' input`
}
core.warning(message)
diff = '..'
}
const submoduleFiles = await getAllChangedFiles({
cwd: submoduleWorkingDirectory,
sha1: submoduleShaResult.previousSha,
sha2: submoduleShaResult.currentSha,
diff: diffResult.diff,
diff,
isSubmodule: true,
parentDir: submodulePath,
outputRenamedFilesAsDeletedAndAdded
outputRenamedFilesAsDeletedAndAdded,
failOnSubmoduleDiffError
})
for (const changeType of Object.keys(
@@ -155,6 +303,35 @@ export const getAllDiffFiles = async ({
return files
}
function* getFilePaths({
inputs,
filePaths,
dirNamesIncludeFilePatterns
}: {
inputs: Inputs
filePaths: string[]
dirNamesIncludeFilePatterns: string[]
}): Generator<string> {
for (const filePath of filePaths) {
if (inputs.dirNames) {
if (dirNamesIncludeFilePatterns.length > 0) {
const isWin = isWindows()
const matchOptions = {dot: true, windows: isWin, noext: true}
if (mm.isMatch(filePath, dirNamesIncludeFilePatterns, matchOptions)) {
yield filePath
}
}
yield getDirnameMaxDepth({
relativePath: filePath,
dirNamesMaxDepth: inputs.dirNamesMaxDepth,
excludeCurrentDir: inputs.dirNamesExcludeCurrentDir
})
} else {
yield filePath
}
}
}
function* getChangeTypeFilesGenerator({
inputs,
changedFiles,
@@ -164,18 +341,21 @@ function* getChangeTypeFilesGenerator({
changedFiles: ChangedFiles
changeTypes: ChangeTypeEnum[]
}): Generator<string> {
const dirNamesIncludeFilePatterns = getDirNamesIncludeFilesPattern({inputs})
core.debug(
`Dir names include file patterns: ${JSON.stringify(
dirNamesIncludeFilePatterns
)}`
)
for (const changeType of changeTypes) {
const files = changedFiles[changeType] || []
for (const filePath of files) {
if (inputs.dirNames) {
yield getDirnameMaxDepth({
relativePath: filePath,
dirNamesMaxDepth: inputs.dirNamesMaxDepth,
excludeCurrentDir: inputs.dirNamesExcludeCurrentDir
})
} else {
yield filePath
}
const filePaths = changedFiles[changeType] || []
for (const filePath of getFilePaths({
inputs,
filePaths,
dirNamesIncludeFilePatterns
})) {
yield filePath
}
}
}
@@ -188,20 +368,15 @@ export const getChangeTypeFiles = async ({
inputs: Inputs
changedFiles: ChangedFiles
changeTypes: ChangeTypeEnum[]
}): Promise<{paths: string; count: string}> => {
}): Promise<{paths: string[] | string; count: string}> => {
const files = [
...new Set(getChangeTypeFilesGenerator({inputs, changedFiles, changeTypes}))
].filter(Boolean)
if (inputs.json) {
return {
paths: jsonOutput({value: files, shouldEscape: inputs.escapeJson}),
count: files.length.toString()
}
}
const paths = inputs.json ? files : files.join(inputs.separator)
return {
paths: files.join(inputs.separator),
paths,
count: files.length.toString()
}
}
@@ -213,16 +388,21 @@ function* getAllChangeTypeFilesGenerator({
inputs: Inputs
changedFiles: ChangedFiles
}): Generator<string> {
for (const filePath of flatten(Object.values(changedFiles))) {
if (inputs.dirNames) {
yield getDirnameMaxDepth({
relativePath: filePath,
dirNamesMaxDepth: inputs.dirNamesMaxDepth,
excludeCurrentDir: inputs.dirNamesExcludeCurrentDir
})
} else {
yield filePath
}
const dirNamesIncludeFilePatterns = getDirNamesIncludeFilesPattern({inputs})
core.debug(
`Dir names include file patterns: ${JSON.stringify(
dirNamesIncludeFilePatterns
)}`
)
const filePaths = flatten(Object.values(changedFiles))
for (const filePath of getFilePaths({
inputs,
filePaths,
dirNamesIncludeFilePatterns
})) {
yield filePath
}
}
@@ -232,20 +412,15 @@ export const getAllChangeTypeFiles = async ({
}: {
inputs: Inputs
changedFiles: ChangedFiles
}): Promise<{paths: string; count: string}> => {
}): Promise<{paths: string[] | string; count: string}> => {
const files = [
...new Set(getAllChangeTypeFilesGenerator({inputs, changedFiles}))
].filter(Boolean)
if (inputs.json) {
return {
paths: jsonOutput({value: files, shouldEscape: inputs.escapeJson}),
count: files.length.toString()
}
}
const paths = inputs.json ? files : files.join(inputs.separator)
return {
paths: files.join(inputs.separator),
paths,
count: files.length.toString()
}
}
@@ -278,9 +453,10 @@ export const getChangedFilesFromGithubAPI = async ({
per_page: 100
})
const paginatedResponse = await octokit.paginate<
RestEndpointMethodTypes['pulls']['listFiles']['response']['data'][0]
>(options)
const paginatedResponse =
await octokit.paginate<
RestEndpointMethodTypes['pulls']['listFiles']['response']['data'][0]
>(options)
core.info(`Found ${paginatedResponse.length} changed files from GitHub API`)
const statusMap: Record<string, ChangeTypeEnum> = {

View File

@@ -1,4 +1,5 @@
import * as core from '@actions/core'
import path from 'path'
import {
ChangedFiles,
ChangeTypeEnum,
@@ -6,25 +7,30 @@ import {
getChangeTypeFiles
} from './changedFiles'
import {Inputs} from './inputs'
import {setOutput} from './utils'
import {getOutputKey, setArrayOutput, setOutput, exists} from './utils'
const getOutputKey = (key: string, outputPrefix: string): string => {
return outputPrefix ? `${outputPrefix}_${key}` : key
const getArrayFromPaths = (
paths: string | string[],
inputs: Inputs
): string[] => {
return Array.isArray(paths) ? paths : paths.split(inputs.separator)
}
export const setChangedFilesOutput = async ({
export const setOutputsAndGetModifiedAndChangedFilesStatus = async ({
allDiffFiles,
allFilteredDiffFiles,
inputs,
filePatterns = [],
outputPrefix = ''
outputPrefix = '',
workingDirectory
}: {
allDiffFiles: ChangedFiles
allFilteredDiffFiles: ChangedFiles
inputs: Inputs
filePatterns?: string[]
outputPrefix?: string
}): Promise<void> => {
workingDirectory?: string
}): Promise<{anyModified: boolean; anyChanged: boolean}> => {
const addedFiles = await getChangeTypeFiles({
inputs,
changedFiles: allFilteredDiffFiles,
@@ -34,12 +40,16 @@ export const setChangedFilesOutput = async ({
await setOutput({
key: getOutputKey('added_files', outputPrefix),
value: addedFiles.paths,
inputs
writeOutputFiles: inputs.writeOutputFiles,
outputDir: inputs.outputDir,
json: inputs.json,
shouldEscape: inputs.escapeJson
})
await setOutput({
key: getOutputKey('added_files_count', outputPrefix),
value: addedFiles.count,
inputs
writeOutputFiles: inputs.writeOutputFiles,
outputDir: inputs.outputDir
})
const copiedFiles = await getChangeTypeFiles({
@@ -51,13 +61,17 @@ export const setChangedFilesOutput = async ({
await setOutput({
key: getOutputKey('copied_files', outputPrefix),
value: copiedFiles.paths,
inputs
writeOutputFiles: inputs.writeOutputFiles,
outputDir: inputs.outputDir,
json: inputs.json,
shouldEscape: inputs.escapeJson
})
await setOutput({
key: getOutputKey('copied_files_count', outputPrefix),
value: copiedFiles.count,
inputs
writeOutputFiles: inputs.writeOutputFiles,
outputDir: inputs.outputDir
})
const modifiedFiles = await getChangeTypeFiles({
@@ -69,13 +83,17 @@ export const setChangedFilesOutput = async ({
await setOutput({
key: getOutputKey('modified_files', outputPrefix),
value: modifiedFiles.paths,
inputs
writeOutputFiles: inputs.writeOutputFiles,
outputDir: inputs.outputDir,
json: inputs.json,
shouldEscape: inputs.escapeJson
})
await setOutput({
key: getOutputKey('modified_files_count', outputPrefix),
value: modifiedFiles.count,
inputs
writeOutputFiles: inputs.writeOutputFiles,
outputDir: inputs.outputDir
})
const renamedFiles = await getChangeTypeFiles({
@@ -87,13 +105,17 @@ export const setChangedFilesOutput = async ({
await setOutput({
key: getOutputKey('renamed_files', outputPrefix),
value: renamedFiles.paths,
inputs
writeOutputFiles: inputs.writeOutputFiles,
outputDir: inputs.outputDir,
json: inputs.json,
shouldEscape: inputs.escapeJson
})
await setOutput({
key: getOutputKey('renamed_files_count', outputPrefix),
value: renamedFiles.count,
inputs
writeOutputFiles: inputs.writeOutputFiles,
outputDir: inputs.outputDir
})
const typeChangedFiles = await getChangeTypeFiles({
@@ -105,13 +127,17 @@ export const setChangedFilesOutput = async ({
await setOutput({
key: getOutputKey('type_changed_files', outputPrefix),
value: typeChangedFiles.paths,
inputs
writeOutputFiles: inputs.writeOutputFiles,
outputDir: inputs.outputDir,
json: inputs.json,
shouldEscape: inputs.escapeJson
})
await setOutput({
key: getOutputKey('type_changed_files_count', outputPrefix),
value: typeChangedFiles.count,
inputs
writeOutputFiles: inputs.writeOutputFiles,
outputDir: inputs.outputDir
})
const unmergedFiles = await getChangeTypeFiles({
@@ -123,13 +149,17 @@ export const setChangedFilesOutput = async ({
await setOutput({
key: getOutputKey('unmerged_files', outputPrefix),
value: unmergedFiles.paths,
inputs
writeOutputFiles: inputs.writeOutputFiles,
outputDir: inputs.outputDir,
json: inputs.json,
shouldEscape: inputs.escapeJson
})
await setOutput({
key: getOutputKey('unmerged_files_count', outputPrefix),
value: unmergedFiles.count,
inputs
writeOutputFiles: inputs.writeOutputFiles,
outputDir: inputs.outputDir
})
const unknownFiles = await getChangeTypeFiles({
@@ -141,13 +171,17 @@ export const setChangedFilesOutput = async ({
await setOutput({
key: getOutputKey('unknown_files', outputPrefix),
value: unknownFiles.paths,
inputs
writeOutputFiles: inputs.writeOutputFiles,
outputDir: inputs.outputDir,
json: inputs.json,
shouldEscape: inputs.escapeJson
})
await setOutput({
key: getOutputKey('unknown_files_count', outputPrefix),
value: unknownFiles.count,
inputs
writeOutputFiles: inputs.writeOutputFiles,
outputDir: inputs.outputDir
})
const allChangedAndModifiedFiles = await getAllChangeTypeFiles({
@@ -162,13 +196,17 @@ export const setChangedFilesOutput = async ({
await setOutput({
key: getOutputKey('all_changed_and_modified_files', outputPrefix),
value: allChangedAndModifiedFiles.paths,
inputs
writeOutputFiles: inputs.writeOutputFiles,
outputDir: inputs.outputDir,
json: inputs.json,
shouldEscape: inputs.escapeJson
})
await setOutput({
key: getOutputKey('all_changed_and_modified_files_count', outputPrefix),
value: allChangedAndModifiedFiles.count,
inputs
writeOutputFiles: inputs.writeOutputFiles,
outputDir: inputs.outputDir
})
const allChangedFiles = await getChangeTypeFiles({
@@ -185,19 +223,25 @@ export const setChangedFilesOutput = async ({
await setOutput({
key: getOutputKey('all_changed_files', outputPrefix),
value: allChangedFiles.paths,
inputs
writeOutputFiles: inputs.writeOutputFiles,
outputDir: inputs.outputDir,
json: inputs.json,
shouldEscape: inputs.escapeJson
})
await setOutput({
key: getOutputKey('all_changed_files_count', outputPrefix),
value: allChangedFiles.count,
inputs
writeOutputFiles: inputs.writeOutputFiles,
outputDir: inputs.outputDir
})
await setOutput({
key: getOutputKey('any_changed', outputPrefix),
value: allChangedFiles.paths.length > 0 && filePatterns.length > 0,
inputs
writeOutputFiles: inputs.writeOutputFiles,
outputDir: inputs.outputDir,
json: inputs.json
})
const allOtherChangedFiles = await getChangeTypeFiles({
@@ -212,12 +256,18 @@ export const setChangedFilesOutput = async ({
})
core.debug(`All other changed files: ${JSON.stringify(allOtherChangedFiles)}`)
const otherChangedFiles = allOtherChangedFiles.paths
.split(inputs.separator)
.filter(
(filePath: string) =>
!allChangedFiles.paths.split(inputs.separator).includes(filePath)
)
const allOtherChangedFilesPaths: string[] = getArrayFromPaths(
allOtherChangedFiles.paths,
inputs
)
const allChangedFilesPaths: string[] = getArrayFromPaths(
allChangedFiles.paths,
inputs
)
const otherChangedFiles = allOtherChangedFilesPaths.filter(
(filePath: string) => !allChangedFilesPaths.includes(filePath)
)
const onlyChanged =
otherChangedFiles.length === 0 &&
@@ -227,19 +277,23 @@ export const setChangedFilesOutput = async ({
await setOutput({
key: getOutputKey('only_changed', outputPrefix),
value: onlyChanged,
inputs
writeOutputFiles: inputs.writeOutputFiles,
outputDir: inputs.outputDir,
json: inputs.json
})
await setOutput({
key: getOutputKey('other_changed_files', outputPrefix),
value: otherChangedFiles.join(inputs.separator),
inputs
await setArrayOutput({
key: 'other_changed_files',
inputs,
value: otherChangedFiles,
outputPrefix
})
await setOutput({
key: getOutputKey('other_changed_files_count', outputPrefix),
value: otherChangedFiles.length.toString(),
inputs
writeOutputFiles: inputs.writeOutputFiles,
outputDir: inputs.outputDir
})
const allModifiedFiles = await getChangeTypeFiles({
@@ -257,19 +311,25 @@ export const setChangedFilesOutput = async ({
await setOutput({
key: getOutputKey('all_modified_files', outputPrefix),
value: allModifiedFiles.paths,
inputs
writeOutputFiles: inputs.writeOutputFiles,
outputDir: inputs.outputDir,
json: inputs.json,
shouldEscape: inputs.escapeJson
})
await setOutput({
key: getOutputKey('all_modified_files_count', outputPrefix),
value: allModifiedFiles.count,
inputs
writeOutputFiles: inputs.writeOutputFiles,
outputDir: inputs.outputDir
})
await setOutput({
key: getOutputKey('any_modified', outputPrefix),
value: allModifiedFiles.paths.length > 0 && filePatterns.length > 0,
inputs
writeOutputFiles: inputs.writeOutputFiles,
outputDir: inputs.outputDir,
json: inputs.json
})
const allOtherModifiedFiles = await getChangeTypeFiles({
@@ -284,12 +344,19 @@ export const setChangedFilesOutput = async ({
]
})
const otherModifiedFiles = allOtherModifiedFiles.paths
.split(inputs.separator)
.filter(
(filePath: string) =>
!allModifiedFiles.paths.split(inputs.separator).includes(filePath)
)
const allOtherModifiedFilesPaths: string[] = getArrayFromPaths(
allOtherModifiedFiles.paths,
inputs
)
const allModifiedFilesPaths: string[] = getArrayFromPaths(
allModifiedFiles.paths,
inputs
)
const otherModifiedFiles = allOtherModifiedFilesPaths.filter(
(filePath: string) => !allModifiedFilesPaths.includes(filePath)
)
const onlyModified =
otherModifiedFiles.length === 0 &&
@@ -299,19 +366,23 @@ export const setChangedFilesOutput = async ({
await setOutput({
key: getOutputKey('only_modified', outputPrefix),
value: onlyModified,
inputs
writeOutputFiles: inputs.writeOutputFiles,
outputDir: inputs.outputDir,
json: inputs.json
})
await setOutput({
key: getOutputKey('other_modified_files', outputPrefix),
value: otherModifiedFiles.join(inputs.separator),
inputs
await setArrayOutput({
key: 'other_modified_files',
inputs,
value: otherModifiedFiles,
outputPrefix
})
await setOutput({
key: getOutputKey('other_modified_files_count', outputPrefix),
value: otherModifiedFiles.length.toString(),
inputs
writeOutputFiles: inputs.writeOutputFiles,
outputDir: inputs.outputDir
})
const deletedFiles = await getChangeTypeFiles({
@@ -320,22 +391,50 @@ export const setChangedFilesOutput = async ({
changeTypes: [ChangeTypeEnum.Deleted]
})
core.debug(`Deleted files: ${JSON.stringify(deletedFiles)}`)
if (
inputs.dirNamesDeletedFilesIncludeOnlyDeletedDirs &&
inputs.dirNames &&
workingDirectory
) {
const newDeletedFilesPaths: string[] = []
for (const deletedPath of getArrayFromPaths(deletedFiles.paths, inputs)) {
const dirPath = path.join(workingDirectory, deletedPath)
core.debug(`Checking if directory exists: ${dirPath}`)
if (!(await exists(dirPath))) {
core.debug(`Directory not found: ${dirPath}`)
newDeletedFilesPaths.push(deletedPath)
}
}
deletedFiles.paths = inputs.json
? newDeletedFilesPaths
: newDeletedFilesPaths.join(inputs.separator)
deletedFiles.count = newDeletedFilesPaths.length.toString()
core.debug(`New deleted files: ${JSON.stringify(deletedFiles)}`)
}
await setOutput({
key: getOutputKey('deleted_files', outputPrefix),
value: deletedFiles.paths,
inputs
writeOutputFiles: inputs.writeOutputFiles,
outputDir: inputs.outputDir,
json: inputs.json,
shouldEscape: inputs.escapeJson
})
await setOutput({
key: getOutputKey('deleted_files_count', outputPrefix),
value: deletedFiles.count,
inputs
writeOutputFiles: inputs.writeOutputFiles,
outputDir: inputs.outputDir
})
await setOutput({
key: getOutputKey('any_deleted', outputPrefix),
value: deletedFiles.paths.length > 0 && filePatterns.length > 0,
inputs
writeOutputFiles: inputs.writeOutputFiles,
outputDir: inputs.outputDir,
json: inputs.json
})
const allOtherDeletedFiles = await getChangeTypeFiles({
@@ -344,11 +443,19 @@ export const setChangedFilesOutput = async ({
changeTypes: [ChangeTypeEnum.Deleted]
})
const otherDeletedFiles = allOtherDeletedFiles.paths
.split(inputs.separator)
.filter(
filePath => !deletedFiles.paths.split(inputs.separator).includes(filePath)
)
const allOtherDeletedFilesPaths: string[] = getArrayFromPaths(
allOtherDeletedFiles.paths,
inputs
)
const deletedFilesPaths: string[] = getArrayFromPaths(
deletedFiles.paths,
inputs
)
const otherDeletedFiles = allOtherDeletedFilesPaths.filter(
filePath => !deletedFilesPaths.includes(filePath)
)
const onlyDeleted =
otherDeletedFiles.length === 0 &&
@@ -358,18 +465,27 @@ export const setChangedFilesOutput = async ({
await setOutput({
key: getOutputKey('only_deleted', outputPrefix),
value: onlyDeleted,
inputs
writeOutputFiles: inputs.writeOutputFiles,
outputDir: inputs.outputDir,
json: inputs.json
})
await setOutput({
key: getOutputKey('other_deleted_files', outputPrefix),
value: otherDeletedFiles.join(inputs.separator),
inputs
await setArrayOutput({
key: 'other_deleted_files',
inputs,
value: otherDeletedFiles,
outputPrefix
})
await setOutput({
key: getOutputKey('other_deleted_files_count', outputPrefix),
value: otherDeletedFiles.length.toString(),
inputs
writeOutputFiles: inputs.writeOutputFiles,
outputDir: inputs.outputDir
})
return {
anyModified: allModifiedFiles.paths.length > 0 && filePatterns.length > 0,
anyChanged: allChangedFiles.paths.length > 0 && filePatterns.length > 0
}
}

View File

@@ -5,6 +5,8 @@ import {Env} from './env'
import {Inputs} from './inputs'
import {
canDiffCommits,
cleanShaInput,
getCurrentBranchName,
getHeadSha,
getParentSha,
getPreviousGitTag,
@@ -22,7 +24,11 @@ const getCurrentSHA = async ({
inputs: Inputs
workingDirectory: string
}): Promise<string> => {
let currentSha = inputs.sha
let currentSha = await cleanShaInput({
sha: inputs.sha,
cwd: workingDirectory,
token: inputs.token
})
core.debug('Getting current SHA...')
if (inputs.until) {
@@ -90,67 +96,95 @@ export const getSHAForNonPullRequestEvent = async (
isTag: boolean
): Promise<DiffResult> => {
let targetBranch = env.GITHUB_REF_NAME
const currentBranch = targetBranch
let currentBranch = targetBranch
let initialCommit = false
if (isShallow && !inputs.skipInitialFetch) {
core.info('Repository is shallow, fetching more history...')
if (!inputs.skipInitialFetch) {
if (isShallow) {
core.info('Repository is shallow, fetching more history...')
if (isTag) {
let sourceBranch = ''
if (isTag) {
let sourceBranch = ''
if (github.context.payload.base_ref) {
sourceBranch = github.context.payload.base_ref.replace(
'refs/heads/',
''
)
} else if (github.context.payload.release?.target_commitish) {
sourceBranch = github.context.payload.release?.target_commitish
if (github.context.payload.base_ref) {
sourceBranch = github.context.payload.base_ref.replace(
'refs/heads/',
''
)
} else if (github.context.payload.release?.target_commitish) {
sourceBranch = github.context.payload.release?.target_commitish
}
await gitFetch({
cwd: workingDirectory,
args: [
...gitFetchExtraArgs,
'-u',
'--progress',
`--deepen=${inputs.fetchDepth}`,
'origin',
`+refs/heads/${sourceBranch}:refs/remotes/origin/${sourceBranch}`
]
})
} else {
await gitFetch({
cwd: workingDirectory,
args: [
...gitFetchExtraArgs,
'-u',
'--progress',
`--deepen=${inputs.fetchDepth}`,
'origin',
`+refs/heads/${targetBranch}:refs/remotes/origin/${targetBranch}`
]
})
}
await gitFetch({
cwd: workingDirectory,
args: [
...gitFetchExtraArgs,
'-u',
'--progress',
`--deepen=${inputs.fetchDepth}`,
'origin',
`+refs/heads/${sourceBranch}:refs/remotes/origin/${sourceBranch}`
]
})
if (hasSubmodule) {
await gitFetchSubmodules({
cwd: workingDirectory,
args: [
...gitFetchExtraArgs,
'-u',
'--progress',
`--deepen=${inputs.fetchDepth}`
]
})
}
} else {
await gitFetch({
cwd: workingDirectory,
args: [
...gitFetchExtraArgs,
'-u',
'--progress',
`--deepen=${inputs.fetchDepth}`,
'origin',
`+refs/heads/${targetBranch}:refs/remotes/origin/${targetBranch}`
]
})
}
if (hasSubmodule) {
await gitFetchSubmodules({
cwd: workingDirectory,
args: [
...gitFetchExtraArgs,
'-u',
'--progress',
`--deepen=${inputs.fetchDepth}`
]
})
if (hasSubmodule && inputs.fetchSubmoduleHistory) {
await gitFetchSubmodules({
cwd: workingDirectory,
args: [
...gitFetchExtraArgs,
'-u',
'--progress',
`--deepen=${inputs.fetchDepth}`
]
})
}
}
}
const currentSha = await getCurrentSHA({inputs, workingDirectory})
let previousSha = inputs.baseSha
let previousSha = await cleanShaInput({
sha: inputs.baseSha,
cwd: workingDirectory,
token: inputs.token
})
const diff = '..'
const currentBranchName = await getCurrentBranchName({cwd: workingDirectory})
if (previousSha && currentSha && currentBranch && targetBranch) {
if (
currentBranchName &&
currentBranchName !== 'HEAD' &&
(currentBranchName !== targetBranch || currentBranchName !== currentBranch)
) {
targetBranch = currentBranchName
currentBranch = currentBranchName
}
if (inputs.baseSha && inputs.sha && currentBranch && targetBranch) {
if (previousSha === currentSha) {
core.error(
`Similar commit hashes detected: previous sha: ${previousSha} is equivalent to the current sha: ${currentSha}.`
@@ -161,7 +195,6 @@ export const getSHAForNonPullRequestEvent = async (
throw new Error('Similar commit hashes detected.')
}
await verifyCommitSha({sha: previousSha, cwd: workingDirectory})
core.debug(`Previous SHA: ${previousSha}`)
return {
@@ -173,7 +206,7 @@ export const getSHAForNonPullRequestEvent = async (
}
}
if (!previousSha) {
if (!previousSha || previousSha === currentSha) {
core.debug('Getting previous SHA...')
if (inputs.since) {
core.debug(`Getting base SHA for '${inputs.since}'...`)
@@ -288,55 +321,68 @@ export const getSHAForPullRequestEvent = async (
targetBranch = currentBranch
}
if (isShallow && !inputs.skipInitialFetch) {
if (!inputs.skipInitialFetch) {
core.info('Repository is shallow, fetching more history...')
let prFetchExitCode = await gitFetch({
cwd: workingDirectory,
args: [
...gitFetchExtraArgs,
'-u',
'--progress',
'origin',
`pull/${github.context.payload.pull_request?.number}/head:${currentBranch}`
]
})
if (prFetchExitCode !== 0) {
prFetchExitCode = await gitFetch({
if (isShallow) {
let prFetchExitCode = await gitFetch({
cwd: workingDirectory,
args: [
...gitFetchExtraArgs,
'-u',
'--progress',
`--deepen=${inputs.fetchDepth}`,
'origin',
`+refs/heads/${currentBranch}*:refs/remotes/origin/${currentBranch}*`
]
})
}
if (prFetchExitCode !== 0) {
throw new Error(
'Failed to fetch pull request branch. Please ensure "persist-credentials" is set to "true" when checking out the repository. See: https://github.com/actions/checkout#usage'
)
}
if (!inputs.sinceLastRemoteCommit) {
core.debug('Fetching target branch...')
await gitFetch({
cwd: workingDirectory,
args: [
...gitFetchExtraArgs,
'-u',
'--progress',
`--deepen=${inputs.fetchDepth}`,
'origin',
`+refs/heads/${targetBranch}:refs/remotes/origin/${targetBranch}`
`pull/${github.context.payload.pull_request?.number}/head:${currentBranch}`
]
})
if (hasSubmodule) {
if (prFetchExitCode !== 0) {
prFetchExitCode = await gitFetch({
cwd: workingDirectory,
args: [
...gitFetchExtraArgs,
'-u',
'--progress',
`--deepen=${inputs.fetchDepth}`,
'origin',
`+refs/heads/${currentBranch}*:refs/remotes/origin/${currentBranch}*`
]
})
}
if (prFetchExitCode !== 0) {
throw new Error(
'Failed to fetch pull request branch. Please ensure "persist-credentials" is set to "true" when checking out the repository. See: https://github.com/actions/checkout#usage'
)
}
if (!inputs.sinceLastRemoteCommit) {
core.debug('Fetching target branch...')
await gitFetch({
cwd: workingDirectory,
args: [
...gitFetchExtraArgs,
'-u',
'--progress',
`--deepen=${inputs.fetchDepth}`,
'origin',
`+refs/heads/${targetBranch}:refs/remotes/origin/${targetBranch}`
]
})
if (hasSubmodule) {
await gitFetchSubmodules({
cwd: workingDirectory,
args: [
...gitFetchExtraArgs,
'-u',
'--progress',
`--deepen=${inputs.fetchDepth}`
]
})
}
}
} else {
if (hasSubmodule && inputs.fetchSubmoduleHistory) {
await gitFetchSubmodules({
cwd: workingDirectory,
args: [
@@ -352,10 +398,14 @@ export const getSHAForPullRequestEvent = async (
}
const currentSha = await getCurrentSHA({inputs, workingDirectory})
let previousSha = inputs.baseSha
let previousSha = await cleanShaInput({
sha: inputs.baseSha,
cwd: workingDirectory,
token: inputs.token
})
let diff = '...'
if (previousSha && currentSha && currentBranch && targetBranch) {
if (inputs.baseSha && inputs.sha && currentBranch && targetBranch) {
if (previousSha === currentSha) {
core.error(
`Similar commit hashes detected: previous sha: ${previousSha} is equivalent to the current sha: ${currentSha}.`
@@ -366,7 +416,6 @@ export const getSHAForPullRequestEvent = async (
throw new Error('Similar commit hashes detected.')
}
await verifyCommitSha({sha: previousSha, cwd: workingDirectory})
core.debug(`Previous SHA: ${previousSha}`)
return {
@@ -385,38 +434,70 @@ export const getSHAForPullRequestEvent = async (
diff = '..'
}
if (!previousSha) {
if (!previousSha || previousSha === currentSha) {
if (inputs.sinceLastRemoteCommit) {
previousSha = github.context.payload.before
if (
!previousSha ||
(previousSha &&
(await verifyCommitSha({sha: previousSha, cwd: workingDirectory})) !==
0)
(await verifyCommitSha({
sha: previousSha,
cwd: workingDirectory,
showAsErrorMessage: false
})) !== 0)
) {
core.warning(
'Unable to locate the remote branch head sha. Falling back to the previous commit in the local history.'
core.info(
`Unable to locate the previous commit in the local history for ${github.context.eventName} (${github.context.payload.action}) event. Falling back to the previous commit in the local history.`
)
previousSha = await getParentSha({
cwd: workingDirectory
})
if (!previousSha) {
core.warning(
'Unable to locate the previous commit in the local history. Falling back to the pull request base sha.'
if (
github.context.payload.action &&
github.context.payload.action === 'synchronize' &&
previousSha &&
(!previousSha ||
(previousSha &&
(await verifyCommitSha({
sha: previousSha,
cwd: workingDirectory,
showAsErrorMessage: false
})) !== 0))
) {
throw new Error(
'Unable to locate the previous commit in the local history. Please ensure to checkout pull request HEAD commit instead of the merge commit. See: https://github.com/actions/checkout/blob/main/README.md#checkout-pull-request-head-commit-instead-of-merge-commit'
)
}
if (
!previousSha ||
(previousSha &&
(await verifyCommitSha({
sha: previousSha,
cwd: workingDirectory,
showAsErrorMessage: false
})) !== 0)
) {
throw new Error(
'Unable to locate the previous commit in the local history. Please ensure to checkout pull request HEAD commit instead of the merge commit. See: https://github.com/actions/checkout/blob/main/README.md#checkout-pull-request-head-commit-instead-of-merge-commit'
)
previousSha = github.context.payload.pull_request?.base?.sha
}
}
} else {
previousSha = await getRemoteBranchHeadSha({
cwd: workingDirectory,
branch: targetBranch
})
if (!previousSha) {
if (github.context.payload.action === 'closed') {
previousSha = github.context.payload.pull_request?.base?.sha
} else {
previousSha = await getRemoteBranchHeadSha({
cwd: workingDirectory,
branch: targetBranch
})
if (!previousSha) {
previousSha = github.context.payload.pull_request?.base?.sha
}
}
if (isShallow) {
@@ -492,6 +573,12 @@ export const getSHAForPullRequestEvent = async (
diff
}))
) {
core.warning(
'If this pull request is from a forked repository, please set the checkout action `repository` input to the same repository as the pull request.'
)
core.warning(
'This can be done by setting actions/checkout `repository` to ${{ github.event.pull_request.head.repo.full_name }}'
)
throw new Error(
`Unable to determine a difference between ${previousSha}${diff}${currentSha}`
)

View File

@@ -29,9 +29,13 @@ export type Inputs = {
dirNames: boolean
dirNamesMaxDepth?: number
dirNamesExcludeCurrentDir: boolean
dirNamesIncludeFiles: string
dirNamesIncludeFilesSeparator: string
dirNamesDeletedFilesIncludeOnlyDeletedDirs: boolean
json: boolean
escapeJson: boolean
fetchDepth?: number
fetchSubmoduleHistory: boolean
sinceLastRemoteCommit: boolean
writeOutputFiles: boolean
outputDir: string
@@ -45,6 +49,9 @@ export type Inputs = {
token: string
apiUrl: string
skipInitialFetch: boolean
failOnInitialDiffError: boolean
failOnSubmoduleDiffError: boolean
negationPatternsFirst: boolean
}
export const getInputs = (): Inputs => {
@@ -135,6 +142,16 @@ export const getInputs = (): Inputs => {
required: false
}
)
const dirNamesIncludeFiles = core.getInput('dir_names_include_files', {
required: false
})
const dirNamesIncludeFilesSeparator = core.getInput(
'dir_names_include_files_separator',
{
required: false,
trimWhitespace: false
}
)
const json = core.getBooleanInput('json', {required: false})
const escapeJson = core.getBooleanInput('escape_json', {required: false})
const fetchDepth = core.getInput('fetch_depth', {required: false})
@@ -177,6 +194,37 @@ export const getInputs = (): Inputs => {
const skipInitialFetch = core.getBooleanInput('skip_initial_fetch', {
required: false
})
const fetchSubmoduleHistory = core.getBooleanInput(
'fetch_additional_submodule_history',
{
required: false
}
)
const failOnInitialDiffError = core.getBooleanInput(
'fail_on_initial_diff_error',
{
required: false
}
)
const failOnSubmoduleDiffError = core.getBooleanInput(
'fail_on_submodule_diff_error',
{
required: false
}
)
const dirNamesDeletedFilesIncludeOnlyDeletedDirs = core.getBooleanInput(
'dir_names_deleted_files_include_only_deleted_dirs',
{
required: false
}
)
const negationPatternsFirst = core.getBooleanInput(
'negation_patterns_first',
{
required: false
}
)
const inputs: Inputs = {
files,
@@ -193,6 +241,8 @@ export const getInputs = (): Inputs => {
filesIgnoreYaml,
filesIgnoreYamlFromSourceFile,
filesIgnoreYamlFromSourceFileSeparator,
failOnInitialDiffError,
failOnSubmoduleDiffError,
separator,
// Not Supported via REST API
sha,
@@ -212,9 +262,14 @@ export const getInputs = (): Inputs => {
includeAllOldNewRenamedFiles,
oldNewSeparator,
oldNewFilesSeparator,
skipInitialFetch,
fetchSubmoduleHistory,
dirNamesDeletedFilesIncludeOnlyDeletedDirs,
// End Not Supported via REST API
dirNames,
dirNamesExcludeCurrentDir,
dirNamesIncludeFiles,
dirNamesIncludeFilesSeparator,
json,
escapeJson,
writeOutputFiles,
@@ -222,7 +277,7 @@ export const getInputs = (): Inputs => {
outputRenamedFilesAsDeletedAndAdded,
token,
apiUrl,
skipInitialFetch
negationPatternsFirst
}
if (fetchDepth) {

View File

@@ -2,23 +2,21 @@ import * as core from '@actions/core'
import * as github from '@actions/github'
import path from 'path'
import {
ChangedFiles,
processChangedFiles,
ChangeTypeEnum,
getAllDiffFiles,
getChangedFilesFromGithubAPI,
getRenamedFiles
} from './changedFiles'
import {setChangedFilesOutput} from './changedFilesOutput'
import {
DiffResult,
getSHAForPullRequestEvent,
getSHAForNonPullRequestEvent
getSHAForNonPullRequestEvent,
getSHAForPullRequestEvent
} from './commitSha'
import {Env, getEnv} from './env'
import {getInputs, Inputs} from './inputs'
import {
getFilePatterns,
getFilteredChangedFiles,
getRecoverFilePatterns,
getSubmodulePath,
getYamlFilePatterns,
@@ -31,73 +29,7 @@ import {
verifyMinimumGitVersion
} from './utils'
const changedFilesOutput = async ({
filePatterns,
allDiffFiles,
inputs,
yamlFilePatterns
}: {
filePatterns: string[]
allDiffFiles: ChangedFiles
inputs: Inputs
yamlFilePatterns: Record<string, string[]>
}): Promise<void> => {
if (filePatterns.length > 0) {
core.startGroup('changed-files-patterns')
const allFilteredDiffFiles = await getFilteredChangedFiles({
allDiffFiles,
filePatterns
})
core.debug(
`All filtered diff files: ${JSON.stringify(allFilteredDiffFiles)}`
)
await setChangedFilesOutput({
allDiffFiles,
allFilteredDiffFiles,
inputs,
filePatterns
})
core.info('All Done!')
core.endGroup()
}
if (Object.keys(yamlFilePatterns).length > 0) {
for (const key of Object.keys(yamlFilePatterns)) {
core.startGroup(`changed-files-yaml-${key}`)
const allFilteredDiffFiles = await getFilteredChangedFiles({
allDiffFiles,
filePatterns: yamlFilePatterns[key]
})
core.debug(
`All filtered diff files for ${key}: ${JSON.stringify(
allFilteredDiffFiles
)}`
)
await setChangedFilesOutput({
allDiffFiles,
allFilteredDiffFiles,
inputs,
filePatterns: yamlFilePatterns[key],
outputPrefix: key
})
core.info('All Done!')
core.endGroup()
}
}
if (filePatterns.length === 0 && Object.keys(yamlFilePatterns).length === 0) {
core.startGroup('changed-files-all')
await setChangedFilesOutput({
allDiffFiles,
allFilteredDiffFiles: allDiffFiles,
inputs
})
core.info('All Done!')
core.endGroup()
}
}
const getChangedFilesFromLocalGit = async ({
const getChangedFilesFromLocalGitHistory = async ({
inputs,
env,
workingDirectory,
@@ -190,7 +122,10 @@ const getChangedFilesFromLocalGit = async ({
hasSubmodule,
diffResult,
submodulePaths,
outputRenamedFilesAsDeletedAndAdded
outputRenamedFilesAsDeletedAndAdded,
fetchSubmoduleHistory: inputs.fetchSubmoduleHistory,
failOnInitialDiffError: inputs.failOnInitialDiffError,
failOnSubmoduleDiffError: inputs.failOnSubmoduleDiffError
})
core.debug(`All diff files: ${JSON.stringify(allDiffFiles)}`)
core.info('All Done!')
@@ -209,15 +144,18 @@ const getChangedFilesFromLocalGit = async ({
workingDirectory,
deletedFiles: allDiffFiles[ChangeTypeEnum.Deleted],
recoverPatterns,
sha: diffResult.previousSha
diffResult,
hasSubmodule,
submodulePaths
})
}
await changedFilesOutput({
await processChangedFiles({
filePatterns,
allDiffFiles,
inputs,
yamlFilePatterns
yamlFilePatterns,
workingDirectory
})
if (inputs.includeAllOldNewRenamedFiles) {
@@ -233,12 +171,16 @@ const getChangedFilesFromLocalGit = async ({
await setOutput({
key: 'all_old_new_renamed_files',
value: allOldNewRenamedFiles.paths,
inputs
writeOutputFiles: inputs.writeOutputFiles,
outputDir: inputs.outputDir,
json: inputs.json
})
await setOutput({
key: 'all_old_new_renamed_files_count',
value: allOldNewRenamedFiles.count,
inputs
writeOutputFiles: inputs.writeOutputFiles,
outputDir: inputs.outputDir,
json: inputs.json
})
core.info('All Done!')
core.endGroup()
@@ -260,7 +202,7 @@ const getChangedFilesFromRESTAPI = async ({
core.debug(`All diff files: ${JSON.stringify(allDiffFiles)}`)
core.info('All Done!')
await changedFilesOutput({
await processChangedFiles({
filePatterns,
allDiffFiles,
inputs,
@@ -314,7 +256,12 @@ export async function run(): Promise<void> {
'sinceLastRemoteCommit',
'recoverDeletedFiles',
'recoverDeletedFilesToDestination',
'includeAllOldNewRenamedFiles'
'recoverFiles',
'recoverFilesIgnore',
'includeAllOldNewRenamedFiles',
'skipInitialFetch',
'fetchSubmoduleHistory',
'dirNamesDeletedFilesIncludeOnlyDeletedDirs'
]
for (const input of unsupportedInputs) {
@@ -338,7 +285,7 @@ export async function run(): Promise<void> {
}
core.info('Using local .git directory')
await getChangedFilesFromLocalGit({
await getChangedFilesFromLocalGitHistory({
inputs,
env,
workingDirectory,

View File

@@ -1,6 +1,7 @@
/*global AsyncIterableIterator*/
import * as core from '@actions/core'
import * as exec from '@actions/exec'
import * as github from '@actions/github'
import {createReadStream, promises as fs} from 'fs'
import {readFile} from 'fs/promises'
import {flattenDeep} from 'lodash'
@@ -9,7 +10,7 @@ import * as path from 'path'
import {createInterface} from 'readline'
import {parseDocument} from 'yaml'
import {ChangedFiles, ChangeTypeEnum} from './changedFiles'
import {DiffResult} from './commitSha'
import {Inputs} from './inputs'
const MINIMUM_GIT_VERSION = '2.18.0'
@@ -38,15 +39,6 @@ export const normalizeSeparators = (p: string): string => {
return p.replace(/\/\/+/g, '/')
}
/**
* Normalize file path separators to '/' on all platforms
* @param p - file path
* @returns file path with normalized separators
*/
const normalizePath = (p: string): string => {
return p.replace(/\\/g, '/')
}
/**
* Trims unnecessary trailing slash from file path
* @param p - file path
@@ -149,7 +141,7 @@ export const verifyMinimumGitVersion = async (): Promise<void> => {
* @param filePath - path to check
* @returns path exists
*/
const exists = async (filePath: string): Promise<boolean> => {
export const exists = async (filePath: string): Promise<boolean> => {
try {
await fs.access(filePath)
return true
@@ -365,7 +357,7 @@ export const getSubmodulePath = async ({
return stdout
.trim()
.split('\n')
.map((line: string) => normalizePath(line.trim().split(' ')[1]))
.map((line: string) => normalizeSeparators(line.trim().split(' ')[1]))
}
/**
@@ -478,13 +470,15 @@ export const gitRenamedFiles = async ({
core.debug(`Renamed file: ${line}`)
const [, oldPath, newPath] = line.split('\t')
if (isSubmodule) {
return `${normalizePath(
return `${normalizeSeparators(
path.join(parentDir, oldPath)
)}${oldNewSeparator}${normalizePath(path.join(parentDir, newPath))}`
)}${oldNewSeparator}${normalizeSeparators(
path.join(parentDir, newPath)
)}`
}
return `${normalizePath(oldPath)}${oldNewSeparator}${normalizePath(
newPath
)}`
return `${normalizeSeparators(
oldPath
)}${oldNewSeparator}${normalizeSeparators(newPath)}`
})
}
@@ -497,6 +491,8 @@ export const gitRenamedFiles = async ({
* @param isSubmodule - is the repo a submodule
* @param parentDir - parent directory of the submodule
* @param outputRenamedFilesAsDeletedAndAdded - output renamed files as deleted and added
* @param failOnInitialDiffError - fail if the initial diff fails
* @param failOnSubmoduleDiffError - fail if the submodule diff fails
*/
export const getAllChangedFiles = async ({
cwd,
@@ -505,7 +501,9 @@ export const getAllChangedFiles = async ({
diff,
isSubmodule = false,
parentDir = '',
outputRenamedFilesAsDeletedAndAdded = false
outputRenamedFilesAsDeletedAndAdded = false,
failOnInitialDiffError = false,
failOnSubmoduleDiffError = false
}: {
cwd: string
sha1: string
@@ -514,6 +512,8 @@ export const getAllChangedFiles = async ({
isSubmodule?: boolean
parentDir?: string
outputRenamedFilesAsDeletedAndAdded?: boolean
failOnInitialDiffError?: boolean
failOnSubmoduleDiffError?: boolean
}): Promise<ChangedFiles> => {
const {exitCode, stdout, stderr} = await exec.getExecOutput(
'git',
@@ -541,6 +541,18 @@ export const getAllChangedFiles = async ({
[ChangeTypeEnum.Unknown]: []
}
if (exitCode !== 0) {
if (failOnInitialDiffError && !isSubmodule) {
throw new Error(
`Failed to get changed files between: ${sha1}${diff}${sha2}: ${stderr}`
)
} else if (failOnSubmoduleDiffError && isSubmodule) {
throw new Error(
`Failed to get changed files for submodule between: ${sha1}${diff}${sha2}: ${stderr}`
)
}
}
if (exitCode !== 0) {
if (isSubmodule) {
core.warning(
@@ -564,11 +576,11 @@ export const getAllChangedFiles = async ({
for (const line of lines) {
const [changeType, filePath, newPath = ''] = line.split('\t')
const normalizedFilePath = isSubmodule
? normalizePath(path.join(parentDir, filePath))
: normalizePath(filePath)
? normalizeSeparators(path.join(parentDir, filePath))
: normalizeSeparators(filePath)
const normalizedNewPath = isSubmodule
? normalizePath(path.join(parentDir, newPath))
: normalizePath(newPath)
? normalizeSeparators(path.join(parentDir, newPath))
: normalizeSeparators(newPath)
if (changeType.startsWith('R')) {
if (outputRenamedFilesAsDeletedAndAdded) {
@@ -607,15 +619,16 @@ export const getFilteredChangedFiles = async ({
[ChangeTypeEnum.Unknown]: []
}
const hasFilePatterns = filePatterns.length > 0
const isWin = isWindows()
for (const changeType of Object.keys(allDiffFiles)) {
const files = allDiffFiles[changeType as ChangeTypeEnum]
if (hasFilePatterns) {
changedFiles[changeType as ChangeTypeEnum] = mm(files, filePatterns, {
dot: true,
windows: isWindows(),
windows: isWin,
noext: true
})
}).map(normalizeSeparators)
} else {
changedFiles[changeType as ChangeTypeEnum] = files
}
@@ -685,6 +698,28 @@ export const getRemoteBranchHeadSha = async ({
return stdout.trim()
}
export const getCurrentBranchName = async ({
cwd
}: {
cwd: string
}): Promise<string> => {
const {stdout, exitCode} = await exec.getExecOutput(
'git',
['rev-parse', '--abbrev-ref', 'HEAD'],
{
cwd,
ignoreReturnCode: true,
silent: !core.isDebug()
}
)
if (exitCode !== 0) {
return ''
}
return stdout.trim()
}
export const getParentSha = async ({cwd}: {cwd: string}): Promise<string> => {
const {stdout, exitCode} = await exec.getExecOutput(
'git',
@@ -738,6 +773,56 @@ export const verifyCommitSha = async ({
return exitCode
}
/**
* Clean the sha from the input which could be a branch name or a commit sha.
*
* If the input is a valid commit sha, return it as is.
*
* If the input is a branch name, get the HEAD sha of that branch and return it.
*
* @param sha The input string, which could be a branch name or a commit sha.
* @param cwd The working directory.
* @param token The GitHub token.
* @returns The cleaned SHA string.
*/
export const cleanShaInput = async ({
sha,
cwd,
token
}: {
sha: string
cwd: string
token: string
}): Promise<string> => {
// Check if the input is a valid commit sha
if (!sha) {
return sha
}
// Check if the input is a valid commit sha
const {stdout, exitCode} = await exec.getExecOutput(
'git',
['rev-parse', '--verify', `${sha}^{commit}`],
{
cwd,
ignoreReturnCode: true,
silent: !core.isDebug()
}
)
if (exitCode !== 0) {
const octokit = github.getOctokit(token)
// If it's not a valid commit sha, assume it's a branch name and get the HEAD sha
const {data: refData} = await octokit.rest.git.getRef({
owner: github.context.repo.owner,
repo: github.context.repo.repo,
ref: `heads/${sha}`
})
return refData.object.sha
}
return stdout.trim()
}
export const getPreviousGitTag = async ({
cwd
}: {
@@ -745,7 +830,7 @@ export const getPreviousGitTag = async ({
}): Promise<{tag: string; sha: string}> => {
const {stdout} = await exec.getExecOutput(
'git',
['tag', '--sort=-version:refname'],
['tag', '--sort=-creatordate'],
{
cwd,
silent: !core.isDebug()
@@ -873,14 +958,14 @@ export const getDirnameMaxDepth = ({
return ''
}
return normalizePath(output)
return normalizeSeparators(output)
}
export const jsonOutput = ({
value,
shouldEscape
}: {
value: string | string[]
value: string | string[] | boolean
shouldEscape: boolean
}): string => {
const result = JSON.stringify(value)
@@ -888,6 +973,16 @@ export const jsonOutput = ({
return shouldEscape ? result.replace(/"/g, '\\"') : result
}
export const getDirNamesIncludeFilesPattern = ({
inputs
}: {
inputs: Inputs
}): string[] => {
return inputs.dirNamesIncludeFiles
.split(inputs.dirNamesIncludeFilesSeparator)
.filter(Boolean)
}
export const getFilePatterns = async ({
inputs,
workingDirectory
@@ -895,93 +990,99 @@ export const getFilePatterns = async ({
inputs: Inputs
workingDirectory: string
}): Promise<string[]> => {
let filePatterns = inputs.files
.split(inputs.filesSeparator)
.filter(p => p !== '')
.join('\n')
let cleanedFilePatterns: string[] = []
if (inputs.files) {
const filesPatterns = inputs.files
.split(inputs.filesSeparator)
.filter(Boolean)
cleanedFilePatterns.push(...filesPatterns)
core.debug(`files patterns: ${filesPatterns.join('\n')}`)
}
if (inputs.filesFromSourceFile !== '') {
const inputFilesFromSourceFile = inputs.filesFromSourceFile
.split(inputs.filesFromSourceFileSeparator)
.filter(p => p !== '')
.filter(Boolean)
.map(p => path.join(workingDirectory, p))
core.debug(`files from source file: ${inputFilesFromSourceFile}`)
const filesFromSourceFiles = (
await getFilesFromSourceFile({filePaths: inputFilesFromSourceFile})
).join('\n')
const filesFromSourceFiles = await getFilesFromSourceFile({
filePaths: inputFilesFromSourceFile
})
core.debug(`files from source files patterns: ${filesFromSourceFiles}`)
core.debug(
`files from source files patterns: ${filesFromSourceFiles.join('\n')}`
)
filePatterns = filePatterns.concat('\n', filesFromSourceFiles)
cleanedFilePatterns.push(...filesFromSourceFiles)
}
if (inputs.filesIgnore) {
const filesIgnorePatterns = inputs.filesIgnore
.split(inputs.filesIgnoreSeparator)
.filter(p => p !== '')
.filter(Boolean)
.map(p => {
if (!p.startsWith('!')) {
p = `!${p}`
}
return p
})
.join('\n')
core.debug(`files ignore patterns: ${filesIgnorePatterns}`)
core.debug(`files ignore patterns: ${filesIgnorePatterns.join('\n')}`)
filePatterns = filePatterns.concat('\n', filesIgnorePatterns)
cleanedFilePatterns.push(...filesIgnorePatterns)
}
if (inputs.filesIgnoreFromSourceFile) {
const inputFilesIgnoreFromSourceFile = inputs.filesIgnoreFromSourceFile
.split(inputs.filesIgnoreFromSourceFileSeparator)
.filter(p => p !== '')
.filter(Boolean)
.map(p => path.join(workingDirectory, p))
core.debug(
`files ignore from source file: ${inputFilesIgnoreFromSourceFile}`
)
const filesIgnoreFromSourceFiles = (
await getFilesFromSourceFile({
filePaths: inputFilesIgnoreFromSourceFile,
excludedFiles: true
})
).join('\n')
const filesIgnoreFromSourceFiles = await getFilesFromSourceFile({
filePaths: inputFilesIgnoreFromSourceFile,
excludedFiles: true
})
core.debug(
`files ignore from source files patterns: ${filesIgnoreFromSourceFiles}`
`files ignore from source files patterns: ${filesIgnoreFromSourceFiles.join(
'\n'
)}`
)
filePatterns = filePatterns.concat('\n', filesIgnoreFromSourceFiles)
cleanedFilePatterns.push(...filesIgnoreFromSourceFiles)
}
if (inputs.negationPatternsFirst) {
cleanedFilePatterns.sort((a, b) => {
return a.startsWith('!') ? -1 : b.startsWith('!') ? 1 : 0
})
}
// Reorder file patterns '**' should come first
if (cleanedFilePatterns.includes('**')) {
cleanedFilePatterns.sort((a, b) => {
return a === '**' ? -1 : b === '**' ? 1 : 0
})
}
if (isWindows()) {
filePatterns = filePatterns.replace(/\r\n/g, '\n')
filePatterns = filePatterns.replace(/\r/g, '\n')
cleanedFilePatterns = cleanedFilePatterns.map(pattern =>
pattern.replace(/\r\n/g, '\n').replace(/\r/g, '\n')
)
}
core.debug(`file patterns: ${filePatterns}`)
core.debug(`Input file patterns: \n${cleanedFilePatterns.join('\n')}`)
return filePatterns
.trim()
.split('\n')
.filter(Boolean)
.map(pattern => {
if (pattern.endsWith('/')) {
return `${pattern}**`
} else {
const pathParts = pattern.split(path.sep)
const lastPart = pathParts[pathParts.length - 1]
if (!lastPart.includes('.')) {
return `${pattern}${path.sep}**`
} else {
return pattern
}
}
})
return cleanedFilePatterns
}
// Example YAML input:
@@ -1201,21 +1302,58 @@ export const getRecoverFilePatterns = ({
return filePatterns.filter(Boolean)
}
export const getOutputKey = (key: string, outputPrefix: string): string => {
return outputPrefix ? `${outputPrefix}_${key}` : key
}
export const setArrayOutput = async ({
key,
inputs,
value,
outputPrefix
}: {
key: string
inputs: Inputs
value: string[]
outputPrefix?: string
}): Promise<void> => {
core.debug(`${key}: ${JSON.stringify(value)}`)
await setOutput({
key: outputPrefix ? getOutputKey(key, outputPrefix) : key,
value: inputs.json ? value : value.join(inputs.separator),
writeOutputFiles: inputs.writeOutputFiles,
outputDir: inputs.outputDir,
json: inputs.json,
shouldEscape: inputs.escapeJson
})
}
export const setOutput = async ({
key,
value,
inputs
writeOutputFiles,
outputDir,
json = false,
shouldEscape = false
}: {
key: string
value: string | boolean
inputs: Inputs
value: string | string[] | boolean
writeOutputFiles: boolean
outputDir: string
json?: boolean
shouldEscape?: boolean
}): Promise<void> => {
const cleanedValue = value.toString().trim()
let cleanedValue
if (json) {
cleanedValue = jsonOutput({value, shouldEscape})
} else {
cleanedValue = value.toString().trim()
}
core.setOutput(key, cleanedValue)
if (inputs.writeOutputFiles) {
const outputDir = inputs.outputDir
const extension = inputs.json ? 'json' : 'txt'
if (writeOutputFiles) {
const extension = json ? 'json' : 'txt'
const outputFilePath = path.join(outputDir, `${key}.${extension}`)
if (!(await exists(outputDir))) {
@@ -1258,13 +1396,17 @@ export const recoverDeletedFiles = async ({
workingDirectory,
deletedFiles,
recoverPatterns,
sha
diffResult,
hasSubmodule,
submodulePaths
}: {
inputs: Inputs
workingDirectory: string
deletedFiles: string[]
recoverPatterns: string[]
sha: string
diffResult: DiffResult
hasSubmodule: boolean
submodulePaths: string[]
}): Promise<void> => {
let recoverableDeletedFiles = deletedFiles
core.debug(`recoverable deleted files: ${recoverableDeletedFiles}`)
@@ -1289,16 +1431,55 @@ export const recoverDeletedFiles = async ({
)
}
const deletedFileContents = await getDeletedFileContents({
cwd: workingDirectory,
filePath: deletedFile,
sha
})
let deletedFileContents: string
const submodulePath = submodulePaths.find(p => deletedFile.startsWith(p))
if (hasSubmodule && submodulePath) {
const submoduleShaResult = await gitSubmoduleDiffSHA({
cwd: workingDirectory,
parentSha1: diffResult.previousSha,
parentSha2: diffResult.currentSha,
submodulePath,
diff: diffResult.diff
})
if (submoduleShaResult.previousSha) {
core.debug(
`recovering deleted file "${deletedFile}" from submodule ${submodulePath} from ${submoduleShaResult.previousSha}`
)
deletedFileContents = await getDeletedFileContents({
cwd: path.join(workingDirectory, submodulePath),
// E.g. submodulePath = test/demo and deletedFile = test/demo/.github/README.md => filePath => .github/README.md
filePath: deletedFile.replace(submodulePath, '').substring(1),
sha: submoduleShaResult.previousSha
})
} else {
core.warning(
`Unable to recover deleted file "${deletedFile}" from submodule ${submodulePath} from ${submoduleShaResult.previousSha}`
)
continue
}
} else {
core.debug(
`recovering deleted file "${deletedFile}" from ${diffResult.previousSha}`
)
deletedFileContents = await getDeletedFileContents({
cwd: workingDirectory,
filePath: deletedFile,
sha: diffResult.previousSha
})
}
core.debug(`recovered deleted file "${deletedFile}"`)
if (!(await exists(path.dirname(target)))) {
core.debug(`creating directory "${path.dirname(target)}"`)
await fs.mkdir(path.dirname(target), {recursive: true})
}
core.debug(`writing file "${target}"`)
await fs.writeFile(target, deletedFileContents)
core.debug(`wrote file "${target}"`)
}
}

2481
yarn.lock

File diff suppressed because it is too large Load Diff