Compare commits

...

118 Commits
v40.0.2 ... v40

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
22 changed files with 3998 additions and 2452 deletions

View File

@@ -197,6 +197,17 @@
"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,

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

@@ -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

@@ -42,7 +42,7 @@ jobs:
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -56,7 +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."

View File

@@ -8,10 +8,10 @@ on:
jobs:
changed-files:
name: Get changes
name: Get changed files
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
matrix: ${{ steps.changed-files.outputs.all_changed_files }}
steps:
- name: Checkout
uses: actions/checkout@v4
@@ -23,17 +23,17 @@ 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:

View File

@@ -4,9 +4,6 @@ on:
push:
branches:
- "**"
pull_request_review:
types: [edited, dismissed, submitted]
pull_request_target:
pull_request:
types:
- assigned
@@ -27,20 +24,9 @@ on:
- auto_merge_enabled
- auto_merge_disabled
branches:
- main
- "**"
jobs:
shellcheck:
name: Run shellcheck
runs-on: ubuntu-latest
steps:
- name: Checkout branch
uses: actions/checkout@v4
- name: shellcheck
uses: reviewdog/action-shellcheck@v1.19
build:
runs-on: ubuntu-latest
outputs:
@@ -53,7 +39,7 @@ jobs:
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Use Node.js 20.x
uses: actions/setup-node@v4.0.0
uses: actions/setup-node@v4.0.1
with:
cache: 'yarn'
node-version: '20.x'
@@ -104,7 +90,7 @@ jobs:
branch: ${{ github.head_ref }}
- name: Upload build assets
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: build-assets
path: dist
@@ -131,7 +117,7 @@ jobs:
path: dir1
- name: Download build assets
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: build-assets
path: dir1/dist
@@ -157,7 +143,7 @@ jobs:
bash
- name: Download build assets
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: build-assets
path: dir2/dist
@@ -204,7 +190,7 @@ jobs:
fetch-depth: 0
- name: Download build assets
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: build-assets
@@ -262,7 +248,7 @@ jobs:
fetch-depth: 0
- name: Download build assets
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: build-assets
@@ -286,11 +272,15 @@ jobs:
shell:
bash
test-unset-github-output-env:
name: Test unset GITHUB_OUTPUT env
test-using-branch-names-for-base-sha-and-sha-inputs:
name: Test using branch names for base_sha and sha inputs
runs-on: ubuntu-latest
needs: build
if: needs.build.outputs.files_changed != 'true'
if: |
(
github.event_name == 'push' ||
github.event_name == 'pull_request'
) && needs.build.outputs.files_changed != 'true'
steps:
- name: Checkout branch
@@ -300,16 +290,15 @@ jobs:
fetch-depth: 0
- name: Download build assets
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: build-assets
- name: Run changed-files with unset GITHUB_OUTPUT env
- name: Run changed-files with main as the base_sha
id: changed-files
continue-on-error: true
uses: ./
env:
GITHUB_OUTPUT: ""
with:
base_sha: main
- name: Show output
run: |
@@ -338,7 +327,7 @@ jobs:
fetch-depth: ${{ matrix.fetch-depth }}
- name: Download build assets
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: build-assets
@@ -369,7 +358,7 @@ jobs:
ref: ${{ github.event.pull_request.head.sha }}
- name: Download build assets
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: build-assets
@@ -403,7 +392,7 @@ jobs:
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Download build assets
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: build-assets
@@ -428,7 +417,7 @@ jobs:
uses: actions/checkout@v4
- name: Download build assets
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: build-assets
@@ -482,7 +471,7 @@ jobs:
uses: actions/checkout@v4
- name: Download build assets
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: build-assets
@@ -542,7 +531,7 @@ jobs:
path: dir1
- name: Download build assets
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: build-assets
path: dir1/dist
@@ -577,7 +566,7 @@ jobs:
fetch-depth: ${{ matrix.fetch-depth }}
- name: Download build assets
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: build-assets
@@ -620,7 +609,7 @@ jobs:
fetch-depth: ${{ matrix.fetch-depth }}
- name: Download build assets
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: build-assets
@@ -652,6 +641,29 @@ jobs:
shell:
bash
- name: Run changed-files with files_yaml, json and write_output_files
id: changed-files-json-write-output-files
uses: ./
with:
files_yaml: |
test:
- .github/workflows/test.yml
json: true
write_output_files: true
- name: Show all outputs
run: |
echo "${{ toJSON(steps.changed-files-json-write-output-files.outputs) }}"
shell:
bash
- name: Show all_changed_files output and list .github/outputs
run: |
echo '${{ toJSON(steps.changed-files-json-write-output-files.outputs.test_all_changed_files) }}'
cat .github/outputs/test_all_changed_files.json
shell:
bash
test-recover-deleted-file:
name: Test changed-files recover deleted file
runs-on: ubuntu-latest
@@ -672,7 +684,7 @@ jobs:
fetch-depth: ${{ matrix.fetch-depth }}
- name: Download build assets
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: build-assets
@@ -812,6 +824,36 @@ jobs:
cat "deleted_files/test/test deleted.txt"
fi
- name: Run changed-files with recover_deleted_files for an expected git submodule file
id: changed-files-recover-deleted-files-within-submodule
uses: ./
with:
base_sha: "3be651e99d3d4eae395694f6c6f3b9d18457f6c8"
sha: "d90c240f2ad4ec04d8f0f48e5ac290ad96ebe850"
recover_deleted_files: true
fetch_depth: 60000
- name: Show output
run: |
echo "${{ toJSON(steps.changed-files-recover-deleted-files-within-submodule.outputs) }}"
shell:
bash
- name: Verify deleted files
if: steps.changed-files-recover-deleted-files-within-submodule.outputs.deleted_files != 'test/demo/.github/FUNDING.yml'
run: |
echo "Expected: (test/demo/.github/FUNDING.yml) got ${{ steps.changed-files-recover-deleted-files-within-submodule.outputs.deleted_files }}"
exit 1
- name: Verify that test/demo/.github/FUNDING.yml is restored
run: |
if [ ! -f "test/demo/.github/FUNDING.yml" ]; then
echo "Expected: (test/demo/.github/FUNDING.yml) to exist"
exit 1
else
cat "test/demo/.github/FUNDING.yml"
rm "test/demo/.github/FUNDING.yml"
fi
test-dir-names-deleted-files-include-only-deleted-dirs-single-file:
name: Test dir names deleted files include only deleted dirs single file
runs-on: ubuntu-latest
@@ -907,7 +949,7 @@ jobs:
fetch-depth: ${{ matrix.fetch-depth }}
- name: Download build assets
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: build-assets
@@ -956,7 +998,7 @@ jobs:
repository: ${{ github.event.pull_request.head.repo.full_name }}
fetch-depth: ${{ matrix.fetch-depth }}
- name: Download build assets
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: build-assets
- name: Dump GitHub context
@@ -1941,7 +1983,7 @@ jobs:
bash
- name: Get branch name
id: branch-name
uses: tj-actions/branch-names@v7
uses: tj-actions/branch-names@v8
if: github.event_name == 'pull_request' && matrix.fetch-depth == 0
- uses: nrwl/nx-set-shas@v4
id: last_successful_commit

View File

@@ -15,6 +15,9 @@ jobs:
- name: Run auto-doc
uses: tj-actions/auto-doc@v3
with:
use_code_blocks: true
use_major_version: true
- name: Run remark
uses: tj-actions/remark@v3

View File

@@ -1,5 +1,286 @@
# Changelog
# [40.2.2](https://github.com/tj-actions/changed-files/compare/v40.2.1...v40.2.2) - (2023-12-10)
## <!-- 1 -->🐛 Bug Fixes
- Bug recovering deleted files for submodules ([#1784](https://github.com/tj-actions/changed-files/issues/1784)) ([9454999](https://github.com/tj-actions/changed-files/commit/94549999469dbfa032becf298d95c87a14c34394)) - (Tonye Jack)
## <!-- 17 --> Remove
- Deleted .github/workflows/auto-approve.yml ([a661767](https://github.com/tj-actions/changed-files/commit/a66176714d5d018bc975bf0246c427135def756c)) - (Tonye Jack)
## <!-- 26 -->🔄 Update
- Updated README.md ([#1786](https://github.com/tj-actions/changed-files/issues/1786))
Co-authored-by: jackton1 <jackton1@users.noreply.github.com> ([7611ff3](https://github.com/tj-actions/changed-files/commit/7611ff348df4d0d46887198cda7203e6fc5ffa80)) - (tj-actions[bot])
- Update README.md ([c116f52](https://github.com/tj-actions/changed-files/commit/c116f52a1566bda08e9782a74c333a21270cf952)) - (Tonye Jack)
- Updated README.md ([#1779](https://github.com/tj-actions/changed-files/issues/1779))
Co-authored-by: jackton1 <jackton1@users.noreply.github.com> ([0b0b642](https://github.com/tj-actions/changed-files/commit/0b0b6429e1c5a0bc3f85230a0e1f6df2cba44600)) - (tj-actions[bot])
- Update README.md ([f732c37](https://github.com/tj-actions/changed-files/commit/f732c371a41ace2af86e5cb2e4f7b0254e4a63e5)) - (Tonye Jack)
- Updated README.md ([#1778](https://github.com/tj-actions/changed-files/issues/1778))
Co-authored-by: jackton1 <jackton1@users.noreply.github.com> ([04c0045](https://github.com/tj-actions/changed-files/commit/04c00459a27a4e6651f4b0fa3d3a4bc500480109)) - (tj-actions[bot])
- Update README.md ([5cee511](https://github.com/tj-actions/changed-files/commit/5cee511ba525ad1e92208283322b32120a033b48)) - (Tonye Jack)
- Update README.md ([399525a](https://github.com/tj-actions/changed-files/commit/399525a994a54fef4ac0ef55192e3d2e30dc0587)) - (Tonye Jack)
- Update README.md ([c075bd2](https://github.com/tj-actions/changed-files/commit/c075bd27195652f012b60452cd3026891de29306)) - (Tonye Jack)
- Update README.md ([2918913](https://github.com/tj-actions/changed-files/commit/29189133419ced6b335e576b1e1f7a9e8061fdd8)) - (Tonye Jack)
## <!-- 3 -->📚 Documentation
- Add rodrigorfk as a contributor for code, test, and bug ([#1785](https://github.com/tj-actions/changed-files/issues/1785)) ([187cf1e](https://github.com/tj-actions/changed-files/commit/187cf1e88cc94e5b5243c6eefcc550510b7894a8)) - (allcontributors[bot])
## <!-- 7 -->⚙️ Miscellaneous Tasks
- **deps:** Bump tj-actions/branch-names from 7 to 8 ([#1782](https://github.com/tj-actions/changed-files/issues/1782)) ([e1e532c](https://github.com/tj-actions/changed-files/commit/e1e532cff0353cb6a98b0bce6ff00b7e7d2cc320)) - (dependabot[bot])
- **deps:** Update dependency @types/node to v20.10.4 ([dfecec4](https://github.com/tj-actions/changed-files/commit/dfecec4fb70c945750762cdad7026ee55d8a205f)) - (renovate[bot])
- **deps:** Update dependency typescript to v5.3.3 ([208b83f](https://github.com/tj-actions/changed-files/commit/208b83f29576c33f31be8846aadbf644242f2b2f)) - (renovate[bot])
- **deps-dev:** Bump @types/jest from 29.5.10 to 29.5.11 ([#1775](https://github.com/tj-actions/changed-files/issues/1775)) ([ccb109a](https://github.com/tj-actions/changed-files/commit/ccb109a58449e62280c2ecefb65010f90fbd0e4f)) - (dependabot[bot])
- Update package.json ([#1774](https://github.com/tj-actions/changed-files/issues/1774)) ([95642a1](https://github.com/tj-actions/changed-files/commit/95642a1ebb79474d514126dd282092c68a08b01b)) - (Tonye Jack)
- Create SECURITY.md ([#1773](https://github.com/tj-actions/changed-files/issues/1773)) ([726e06f](https://github.com/tj-actions/changed-files/commit/726e06f8efc4737fd4c48080f40a21b4305cafab)) - (Tonye Jack)
- **deps:** Update typescript-eslint monorepo to v6.13.2 ([d96fe5d](https://github.com/tj-actions/changed-files/commit/d96fe5d9975371a6b58e65d0a309ad49d70e378e)) - (renovate[bot])
## <!-- 9 -->⬆️ Upgrades
- Upgraded to v40.2.1 ([#1771](https://github.com/tj-actions/changed-files/issues/1771))
Co-authored-by: jackton1 <jackton1@users.noreply.github.com> ([4ae611e](https://github.com/tj-actions/changed-files/commit/4ae611e5c56a1c7f3c356adf173f9f11fcca0376)) - (tj-actions[bot])
# [40.2.1](https://github.com/tj-actions/changed-files/compare/v40.2.0...v40.2.1) - (2023-12-04)
## <!-- 16 --> Add
- Added missing changes and modified dist assets.
([1c93849](https://github.com/tj-actions/changed-files/commit/1c938490c880156b746568a518594309cfb3f66b)) - (GitHub Action)
- Added missing changes and modified dist assets.
([ee5ef75](https://github.com/tj-actions/changed-files/commit/ee5ef758aa548d365981b0889bab497dd108a785)) - (GitHub Action)
## <!-- 17 --> Remove
- Deleted .github/workflows/greetings.yml ([f91c9fe](https://github.com/tj-actions/changed-files/commit/f91c9fe8b1f4719a8e3901b4878b31105efcb66e)) - (Tonye Jack)
## <!-- 26 -->🔄 Update
- Updated README.md ([#1769](https://github.com/tj-actions/changed-files/issues/1769))
Co-authored-by: jackton1 <jackton1@users.noreply.github.com> ([66b77cb](https://github.com/tj-actions/changed-files/commit/66b77cbd0c866511f45c4f624e61034699bc70c2)) - (tj-actions[bot])
- Update README.md ([10bfa98](https://github.com/tj-actions/changed-files/commit/10bfa980b7876a94d460f54bd1b46d5c54b025d3)) - (Tonye Jack)
- Updated README.md ([#1767](https://github.com/tj-actions/changed-files/issues/1767))
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
Co-authored-by: Tonye Jack <jtonye@ymail.com> ([9e46b4f](https://github.com/tj-actions/changed-files/commit/9e46b4f7f7dce12301b893ec0484694ae579108d)) - (tj-actions[bot])
- Update README.md ([3bf6172](https://github.com/tj-actions/changed-files/commit/3bf61725348c8cd85dcf9ce468c35a8e15a5c77e)) - (Tonye Jack)
- Updated README.md ([#1755](https://github.com/tj-actions/changed-files/issues/1755))
Co-authored-by: jackton1 <jackton1@users.noreply.github.com> ([48427af](https://github.com/tj-actions/changed-files/commit/48427afe26457522a3f0f4a5afae46a8bb6261b1)) - (tj-actions[bot])
- Update README.md ([742ed36](https://github.com/tj-actions/changed-files/commit/742ed362b6c6415493f2dd3a2e86ccbb60e1035a)) - (Tonye Jack)
- Updated README.md ([#1750](https://github.com/tj-actions/changed-files/issues/1750))
Co-authored-by: repo-ranger[bot] <repo-ranger[bot]@users.noreply.github.com> ([86cabf5](https://github.com/tj-actions/changed-files/commit/86cabf5ea23ece4cc5468211fbab9fb76f2b1d91)) - (tj-actions[bot])
## <!-- 30 -->📝 Other
- Update test.yml removing pull_request_review event ([#1763](https://github.com/tj-actions/changed-files/issues/1763)) ([af6bdde](https://github.com/tj-actions/changed-files/commit/af6bdde59acc56af0e0a6c6a8acff0d3562162ba)) - (Tonye Jack)
- Remove usage of pull_request_target event from test.yml ([#1758](https://github.com/tj-actions/changed-files/issues/1758)) ([3ca6b80](https://github.com/tj-actions/changed-files/commit/3ca6b800138b4c660c4b99b76bb064cdf3f31e59)) - (Tonye Jack)
## <!-- 6 -->🧪 Testing
- Verify bug writing outputs when files_yaml is used ([#1762](https://github.com/tj-actions/changed-files/issues/1762)) ([fc1fb2b](https://github.com/tj-actions/changed-files/commit/fc1fb2b582f5e701390f9f6200dddd7425a3cc70)) - (Tonye Jack)
## <!-- 7 -->⚙️ Miscellaneous Tasks
- **deps:** Lock file maintenance ([ba558db](https://github.com/tj-actions/changed-files/commit/ba558db9775398895ee078c784a5ddef602bb754)) - (renovate[bot])
- **deps:** Update dependency @types/node to v20.10.3 ([bf19fa2](https://github.com/tj-actions/changed-files/commit/bf19fa23a6b30fb87fe85abdb237154c4573c08c)) - (renovate[bot])
- **deps:** Update dependency eslint-config-prettier to v9.1.0 ([45581f0](https://github.com/tj-actions/changed-files/commit/45581f0044c213a3f45e5036d921892484eb7a0d)) - (renovate[bot])
- **deps:** Update dependency eslint to v8.55.0 ([9ebb48b](https://github.com/tj-actions/changed-files/commit/9ebb48b57af1c93015957959d7d9ffe546df3ccd)) - (renovate[bot])
- **deps:** Update dependency @types/node to v20.10.2 ([4e2dca3](https://github.com/tj-actions/changed-files/commit/4e2dca3ba527858faa57966af9baff3c9bbbb5d6)) - (renovate[bot])
- **deps:** Update dependency @types/node to v20.10.1 ([883b4cc](https://github.com/tj-actions/changed-files/commit/883b4ccbdb2f56448769f275a0d599bb9eb942c6)) - (renovate[bot])
- **deps:** Lock file maintenance ([42fe158](https://github.com/tj-actions/changed-files/commit/42fe158594392b80e30260bbb489eae0ed872e23)) - (renovate[bot])
- Remove unused job ([#1754](https://github.com/tj-actions/changed-files/issues/1754)) ([5c74583](https://github.com/tj-actions/changed-files/commit/5c74583cb3f4bb017cad62c02cf599b60d088a3d)) - (Tonye Jack)
- **deps:** Update typescript-eslint monorepo to v6.13.1 ([44d340e](https://github.com/tj-actions/changed-files/commit/44d340e48cef9bee9d0bd468f0f9a8ccf3219200)) - (renovate[bot])
- **deps:** Update typescript-eslint monorepo to v6.13.0 ([2561448](https://github.com/tj-actions/changed-files/commit/2561448da0579d80e1916a83b9c0d3622add8fc5)) - (renovate[bot])
- Update README.md ([#1749](https://github.com/tj-actions/changed-files/issues/1749)) ([b5fc67a](https://github.com/tj-actions/changed-files/commit/b5fc67a4f5e5dafd4d564eefde1958a4ae7974ac)) - (Tonye Jack)
## <!-- 9 -->⬆️ Upgrades
- Upgraded to v40.2.0 ([#1746](https://github.com/tj-actions/changed-files/issues/1746))
Co-authored-by: jackton1 <jackton1@users.noreply.github.com> ([0b22a52](https://github.com/tj-actions/changed-files/commit/0b22a52bff23bee090e1e07f70f9e7fab8384387)) - (tj-actions[bot])
# [40.2.0](https://github.com/tj-actions/changed-files/compare/v40.1.1...v40.2.0) - (2023-11-27)
## <!-- 0 -->🚀 Features
- Add support for passing branch name to the base_sha and sha inputs ([#1742](https://github.com/tj-actions/changed-files/issues/1742)) ([2139fa1](https://github.com/tj-actions/changed-files/commit/2139fa1b6f71f22bf7d9f21e4aebc3aba987e05e)) - (Tonye Jack)
## <!-- 1 -->🐛 Bug Fixes
- Prevent similar commit hashes error when using the branch name ([#1745](https://github.com/tj-actions/changed-files/issues/1745)) ([da093c1](https://github.com/tj-actions/changed-files/commit/da093c1609db0edd0a037ce9664e135f74bf30d9)) - (Tonye Jack)
- Prevent similar commit hashes error when using the branch name ([#1744](https://github.com/tj-actions/changed-files/issues/1744)) ([c634be9](https://github.com/tj-actions/changed-files/commit/c634be959b924afb7d2f4809d6e309859e191975)) - (Tonye Jack)
## <!-- 13 -->📦 Bumps
- Bump @types/node from 20.9.3 to 20.9.4 ([#1732](https://github.com/tj-actions/changed-files/issues/1732))
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> ([066e72a](https://github.com/tj-actions/changed-files/commit/066e72a5fb4e82931d493f931f84b5df8cab22d0)) - (dependabot[bot])
- Bump @types/jest from 29.5.8 to 29.5.9 ([#1726](https://github.com/tj-actions/changed-files/issues/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>
([c23e564](https://github.com/tj-actions/changed-files/commit/c23e564e671f2f3230a34a588eb3b55f7d60faed)) - (dependabot[bot])
- Bump @types/micromatch from 4.0.5 to 4.0.6 ([#1727](https://github.com/tj-actions/changed-files/issues/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>
([c008025](https://github.com/tj-actions/changed-files/commit/c0080255e3e88e03415d2753b4d4c1f341183f79)) - (dependabot[bot])
- Bump @types/lodash from 4.14.201 to 4.14.202 ([#1728](https://github.com/tj-actions/changed-files/issues/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> ([3a3d3a2](https://github.com/tj-actions/changed-files/commit/3a3d3a2b86e4d416e80a80f115c07915be7d3460)) - (dependabot[bot])
- Bump @types/node from 20.9.2 to 20.9.3 ([#1725](https://github.com/tj-actions/changed-files/issues/1725))
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> ([4da6e32](https://github.com/tj-actions/changed-files/commit/4da6e32cfea3c23f1a8d70337b3cb1307fe74702)) - (dependabot[bot])
## <!-- 16 --> Add
- Added missing changes and modified dist assets.
([607d5dd](https://github.com/tj-actions/changed-files/commit/607d5ddbbfd4921680b18a439387657412549259)) - (GitHub Action)
- Added missing changes and modified dist assets.
([7f1c4cb](https://github.com/tj-actions/changed-files/commit/7f1c4cb6db07d6473fae667073c46ef6e2abc5e7)) - (GitHub Action)
- Added missing changes and modified dist assets.
([1cf54bb](https://github.com/tj-actions/changed-files/commit/1cf54bb5d30a33a40efca5e00884096dd1f49cf9)) - (GitHub Action)
- Added missing changes and modified dist assets.
([d8d3669](https://github.com/tj-actions/changed-files/commit/d8d3669cb396f0081313a19b34a25ad989ba5abb)) - (GitHub Action)
## <!-- 26 -->🔄 Update
- Update README.md ([6784c9e](https://github.com/tj-actions/changed-files/commit/6784c9e1eeb301520aa26a6f786c3a8a1e742786)) - (Tonye Jack)
- Update greetings.yml ([90f2c0c](https://github.com/tj-actions/changed-files/commit/90f2c0c1b1177f4c5813bf893c3c5e2ce4baca93)) - (Tonye Jack)
- Updated README.md ([#1722](https://github.com/tj-actions/changed-files/issues/1722))
Co-authored-by: repo-ranger[bot] <repo-ranger[bot]@users.noreply.github.com> ([f7779a6](https://github.com/tj-actions/changed-files/commit/f7779a6302b8b7cf930b2b7e34213c4b68e3ed2d)) - (tj-actions[bot])
- Updated README.md ([#1721](https://github.com/tj-actions/changed-files/issues/1721))
Co-authored-by: renovate[bot] <renovate[bot]@users.noreply.github.com> ([6d07b6e](https://github.com/tj-actions/changed-files/commit/6d07b6ee5902a442f4fee4603a23ba9f735b1ca0)) - (tj-actions[bot])
- Updated README.md ([#1714](https://github.com/tj-actions/changed-files/issues/1714))
Co-authored-by: jackton1 <jackton1@users.noreply.github.com> ([97825a1](https://github.com/tj-actions/changed-files/commit/97825a1994aabf99e2c01837273ba1716a2fac73)) - (tj-actions[bot])
- Updated README.md ([#1713](https://github.com/tj-actions/changed-files/issues/1713))
Co-authored-by: jackton1 <jackton1@users.noreply.github.com> ([2a9f067](https://github.com/tj-actions/changed-files/commit/2a9f067522563ebf5445c15c1480753821f99354)) - (tj-actions[bot])
- Updated README.md ([#1712](https://github.com/tj-actions/changed-files/issues/1712))
Co-authored-by: jackton1 <jackton1@users.noreply.github.com> ([b082611](https://github.com/tj-actions/changed-files/commit/b082611680535c989a8f91fb644fb1984d01415d)) - (tj-actions[bot])
- Updated README.md ([#1711](https://github.com/tj-actions/changed-files/issues/1711))
Co-authored-by: jackton1 <jackton1@users.noreply.github.com> ([90a4f2a](https://github.com/tj-actions/changed-files/commit/90a4f2a3269003cd5351020e24ad59586c97e2af)) - (tj-actions[bot])
- Updated README.md ([#1710](https://github.com/tj-actions/changed-files/issues/1710))
Co-authored-by: repo-ranger[bot] <repo-ranger[bot]@users.noreply.github.com> ([b20ce84](https://github.com/tj-actions/changed-files/commit/b20ce84763512903636c6bc5e95092a7f35bac61)) - (tj-actions[bot])
## <!-- 7 -->⚙️ Miscellaneous Tasks
- **deps:** Lock file maintenance ([d588360](https://github.com/tj-actions/changed-files/commit/d588360bfe7e5ce0b2ad1ca0f56443a105eb1cc3)) - (renovate[bot])
- **deps:** Update dependency @types/node to v20.10.0 ([0d6e9b7](https://github.com/tj-actions/changed-files/commit/0d6e9b71966503cd14182330532c722316e450bc)) - (renovate[bot])
- **deps:** Update dependency @types/node to v20.9.5 ([8f90cc1](https://github.com/tj-actions/changed-files/commit/8f90cc165ad22c68ab50623b2e5d8397eeb90ec7)) - (renovate[bot])
- **deps:** Update dependency @types/jest to v29.5.10 ([75758bc](https://github.com/tj-actions/changed-files/commit/75758bc65f2f009213bf6f74451bff1200005d00)) - (renovate[bot])
- **deps:** Update dependency @types/lodash to v4.14.202 ([79ef9d3](https://github.com/tj-actions/changed-files/commit/79ef9d3feebded8f767c62aa3ee76368dc028195)) - (renovate[bot])
- **deps:** Update dependency @types/micromatch to v4.0.6 ([da4597e](https://github.com/tj-actions/changed-files/commit/da4597ee22010cde29dcbf422eb2a9480136c3ae)) - (renovate[bot])
- **deps:** Update dependency @types/jest to v29.5.9 ([9f4ec1c](https://github.com/tj-actions/changed-files/commit/9f4ec1c14f0dc5c2f3053c27efba3a63781efb0b)) - (renovate[bot])
- **deps:** Update dependency typescript to v5.3.2 ([939fbca](https://github.com/tj-actions/changed-files/commit/939fbca781a0004fbe7aa648fb6656046a8df71b)) - (renovate[bot])
- **deps:** Update typescript-eslint monorepo to v6.12.0 ([9ba175a](https://github.com/tj-actions/changed-files/commit/9ba175ae245f8a261d7f4acf3ccfaf0a60d32302)) - (renovate[bot])
- Simplify matrix example workflow ([#1719](https://github.com/tj-actions/changed-files/issues/1719)) ([05bdc91](https://github.com/tj-actions/changed-files/commit/05bdc91228c589841621aee130aa6033579687de)) - (Tonye Jack)
- **deps:** Lock file maintenance ([21b4a4b](https://github.com/tj-actions/changed-files/commit/21b4a4bc7b1834f22f8fe7f17a425e984017ea5f)) - (renovate[bot])
- **deps:** Update dependency @types/node to v20.9.2 ([658f397](https://github.com/tj-actions/changed-files/commit/658f39729762255a3e3166fd20c16573fb1738ee)) - (renovate[bot])
- **deps:** Update dependency eslint to v8.54.0 ([38a0c32](https://github.com/tj-actions/changed-files/commit/38a0c329bb00b10f18e61d5f23349fbd1576c08e)) - (renovate[bot])
- **deps:** Update dependency @types/node to v20.9.1 ([b0be21b](https://github.com/tj-actions/changed-files/commit/b0be21b8dfdb45d0b2b92528ce89d727f4bdb89d)) - (renovate[bot])
- Update action.yml ([13189f9](https://github.com/tj-actions/changed-files/commit/13189f9e5209c0bd05c1c253e226dbf548695424)) - (Tonye Jack)
- Update action inputs description ([ad01f6f](https://github.com/tj-actions/changed-files/commit/ad01f6fdbaf0f959888aeeb6684856397af589d1)) - (Tonye Jack)
- Update input description ([a36c479](https://github.com/tj-actions/changed-files/commit/a36c479373da160c2cee10435cf68a4e93e6e68d)) - (Tonye Jack)
- Update input description ([41ff1f2](https://github.com/tj-actions/changed-files/commit/41ff1f224927a20a43124b4d729c696c18771677)) - (Tonye Jack)
- Update update-readme.yml ([#1709](https://github.com/tj-actions/changed-files/issues/1709)) ([875213d](https://github.com/tj-actions/changed-files/commit/875213d4a94e0703cea7109c43ef111b94f1062d)) - (Tonye Jack)
- **deps:** Update typescript-eslint monorepo to v6.11.0 ([71b5765](https://github.com/tj-actions/changed-files/commit/71b57652f02612b6f858d71ddf7115487ad51882)) - (renovate[bot])
- **deps:** Update dependency prettier to v3.1.0 ([834b862](https://github.com/tj-actions/changed-files/commit/834b86247ec0d15224902d58f5531c78be2e3fc5)) - (renovate[bot])
- **deps:** Lock file maintenance ([940b170](https://github.com/tj-actions/changed-files/commit/940b170a31d813bc7b88d3816a643b25b66c1342)) - (renovate[bot])
## <!-- 9 -->⬆️ Upgrades
- Upgraded to v40.1.1 ([#1704](https://github.com/tj-actions/changed-files/issues/1704))
Co-authored-by: jackton1 <jackton1@users.noreply.github.com> ([55b93d0](https://github.com/tj-actions/changed-files/commit/55b93d07342c1bd89af9693bfb44faff42ebcd9e)) - (tj-actions[bot])
# [40.1.1](https://github.com/tj-actions/changed-files/compare/v40.1.0...v40.1.1) - (2023-11-08)
## <!-- 16 --> Add
- Added missing changes and modified dist assets.
([e981e53](https://github.com/tj-actions/changed-files/commit/e981e53b7faf4d2fbf8e077b7eec07ef0f7fa221)) - (GitHub Action)
## <!-- 7 -->⚙️ Miscellaneous Tasks
- **deps:** Update dependency @types/node to v20.9.0 ([25ef392](https://github.com/tj-actions/changed-files/commit/25ef3926d147cd02fc7e931c1ef50772bbb0d25d)) - (renovate[bot])
- **deps:** Update dependency @types/lodash to v4.14.201 ([4d33bd5](https://github.com/tj-actions/changed-files/commit/4d33bd5f9cd03b7df1e544c3426cb9e63c52791e)) - (renovate[bot])
- **deps:** Update dependency @types/micromatch to v4.0.5 ([f25e472](https://github.com/tj-actions/changed-files/commit/f25e47258b32eef5d87030d4f6eb9e20cd7349b0)) - (renovate[bot])
- **deps:** Update dependency @types/uuid to v9.0.7 ([a3c4ccb](https://github.com/tj-actions/changed-files/commit/a3c4ccbde013ddc2eb4c788b5a7162fa72a1ad9b)) - (renovate[bot])
- **deps:** Update dependency @types/jest to v29.5.8 ([b114534](https://github.com/tj-actions/changed-files/commit/b11453410196db60f4c2f6b84ae222a41ed17300)) - (renovate[bot])
- **deps:** Update typescript-eslint monorepo to v6.10.0 ([303f064](https://github.com/tj-actions/changed-files/commit/303f064ba95d994742bfb189d37d5d0632a80222)) - (renovate[bot])
- **deps:** Lock file maintenance ([d850ef9](https://github.com/tj-actions/changed-files/commit/d850ef91f77568044a20bbf67b57d1b74934f716)) - (renovate[bot])
- **deps:** Update dependency eslint to v8.53.0 ([8701b58](https://github.com/tj-actions/changed-files/commit/8701b586f31d75024fe0fcb5eaddd30a7f4c0605)) - (renovate[bot])
## <!-- 9 -->⬆️ Upgrades
- Upgraded to v40.1.0 ([#1695](https://github.com/tj-actions/changed-files/issues/1695))
Co-authored-by: jackton1 <jackton1@users.noreply.github.com> ([9b1ba9a](https://github.com/tj-actions/changed-files/commit/9b1ba9a603ec6c53c7a4610ddf3e14bde70ab0ea)) - (tj-actions[bot])
# [40.1.0](https://github.com/tj-actions/changed-files/compare/v40.0.2...v40.1.0) - (2023-11-03)
## <!-- 0 -->🚀 Features
- Add support for controlling the pattern order ([#1693](https://github.com/tj-actions/changed-files/issues/1693)) ([892553a](https://github.com/tj-actions/changed-files/commit/892553a4576166fd647dbd90ffa4b589f563572b)) - (Tonye Jack)
## <!-- 1 -->🐛 Bug Fixes
- **deps:** Update dependency yaml to v2.3.4 ([c300d15](https://github.com/tj-actions/changed-files/commit/c300d15daea754419fb9f133c53d821f0f6c17ea)) - (renovate[bot])
## <!-- 16 --> Add
- Added missing changes and modified dist assets.
([50a9cc9](https://github.com/tj-actions/changed-files/commit/50a9cc9b7b170bd6aaf4fb94db5da1c223606572)) - (GitHub Action)
## <!-- 26 -->🔄 Update
- Updated README.md ([#1694](https://github.com/tj-actions/changed-files/issues/1694))
Co-authored-by: repo-ranger[bot] <repo-ranger[bot]@users.noreply.github.com> ([18c8a4e](https://github.com/tj-actions/changed-files/commit/18c8a4ecebe93d32ed8a88e1d0c098f5f68c221b)) - (tj-actions[bot])
## <!-- 9 -->⬆️ Upgrades
- Upgraded to v40.0.2 ([#1689](https://github.com/tj-actions/changed-files/issues/1689))
Co-authored-by: jackton1 <jackton1@users.noreply.github.com> ([c076064](https://github.com/tj-actions/changed-files/commit/c07606463672e7c623bc2801b4002bd645aed1f2)) - (tj-actions[bot])
# [40.0.2](https://github.com/tj-actions/changed-files/compare/v40.0.1...v40.0.2) - (2023-10-31)
## <!-- 1 -->🐛 Bug Fixes
- Order of file patterns ([#1688](https://github.com/tj-actions/changed-files/issues/1688)) ([4052680](https://github.com/tj-actions/changed-files/commit/40526807ee1e208a1a8c1bbe6bd2d1b044ef6368)) - (Tonye Jack)
## <!-- 7 -->⚙️ Miscellaneous Tasks
- **deps:** Update dependency @types/node to v20.8.10 ([a59bf8f](https://github.com/tj-actions/changed-files/commit/a59bf8ffcfcfdd831463eff511b55a7123a04aca)) - (renovate[bot])
## <!-- 9 -->⬆️ Upgrades
- Upgraded to v40.0.1 ([#1686](https://github.com/tj-actions/changed-files/issues/1686))
Co-authored-by: jackton1 <jackton1@users.noreply.github.com> ([6821899](https://github.com/tj-actions/changed-files/commit/68218997649ac879f47639455e9669b94750b50f)) - (tj-actions[bot])
# [40.0.1](https://github.com/tj-actions/changed-files/compare/v40.0.0...v40.0.1) - (2023-10-30)
## <!-- 1 -->🐛 Bug Fixes

388
README.md
View File

@@ -9,7 +9,7 @@
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![All Contributors](https://img.shields.io/badge/all_contributors-21-orange.svg?style=flat-square)](#contributors-)
[![All Contributors](https://img.shields.io/badge/all_contributors-22-orange.svg?style=flat-square)](#contributors-)
<!-- ALL-CONTRIBUTORS-BADGE:END -->
@@ -17,9 +17,9 @@
Effortlessly track all changed files and directories relative to a target branch, preceding commit or the last remote commit returning **relative paths** from the project root using this GitHub action.
> **Note**
> \[!NOTE]
>
> * This action solely identifies files that have undergone changes within the context of events such as `pull_request*`, `push`, and more. However, it doesn't detect pending uncommitted changes created during the workflow execution.
> * This action solely identifies files that have changed within the context of events such as `pull_request*`, `push`, and more. However, it doesn't detect pending uncommitted changes created during the workflow execution.
>
> See: https://github.com/tj-actions/verify-changed-files instead
@@ -32,9 +32,9 @@ Effortlessly track all changed files and directories relative to a target branch
* [Using Github's API :octocat:](#using-githubs-api-octocat)
* [On `push` ⬆️](#on-push-)
* [Other supported events :electron:](#other-supported-events-electron)
* [Inputs ⚙️](#inputs-)
* [Useful Acronyms 🧮](#useful-acronyms-)
* [Outputs 📤](#outputs-)
* [Inputs ⚙️](#inputs-)
* [Versioning 🏷️](#versioning-)
* [Examples 📄](#examples-)
* [Real-world usage 🌐](#real-world-usage-)
@@ -51,7 +51,7 @@ Effortlessly track all changed files and directories relative to a target branch
* Fast execution, averaging 0-10 seconds.
* Leverages either [Github's REST API](https://docs.github.com/en/rest/reference/repos#list-commits) or [Git's native diff](https://git-scm.com/docs/git-diff) to determine changed files.
* Facilitates easy debugging.
* Scales to handle large repositories.
* Scales to handle large/mono repositories.
* Supports Git submodules.
* Supports [merge queues](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-a-merge-queue) for pull requests.
* Generates escaped [JSON output for running matrix jobs](https://github.com/tj-actions/changed-files/blob/main/.github/workflows/matrix-test.yml) based on changed files.
@@ -60,7 +60,7 @@ Effortlessly track all changed files and directories relative to a target branch
* Optionally excludes the current directory.
* Writes outputs to a designated `.txt` or `.json` file for further processing.
* Restores deleted files to their previous location or a newly specified location.
* Supports Monorepos by fetching a fixed number of commits.
* Supports fetching a fixed number of commits which improves performance.
* Compatible with all platforms (Linux, MacOS, Windows).
* Supports [GitHub-hosted runners](https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners).
* Supports [GitHub Enterprise Server](https://docs.github.com/en/enterprise-server@3.3/admin/github-actions/getting-started-with-github-actions-for-your-enterprise/getting-started-with-github-actions-for-github-enterprise-server).
@@ -83,7 +83,7 @@ And many more...
## Usage 💻
> **Important**
> \[!IMPORTANT]
>
> * **Push Events**: When configuring [`actions/checkout`](https://github.com/actions/checkout#usage), make sure to set [`fetch-depth`](https://github.com/actions/checkout#usage) to either `0` or `2`, depending on your use case.
> * **Mono Repositories**: To avoid pulling the entire branch history, you can utilize the default [`actions/checkout`](https://github.com/actions/checkout#usage)'s [`fetch-depth`](https://github.com/actions/checkout#usage) of `1` for [`pull_request`](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request) events.
@@ -139,11 +139,12 @@ jobs:
id: changed-markdown-files
uses: tj-actions/changed-files@v40
with:
# Avoid using single or double quotes for multiline patterns
files: |
**.md
# Avoid using single or double quotes for multiline patterns
- name: List all changed files markdown files
if: steps.changed-markdown-files.outputs.any_changed == 'true'
run: |
for file in ${{ steps.changed-markdown-files.outputs.all_changed_files }}; do
echo "$file was changed"
@@ -296,6 +297,305 @@ Support this project with a :star:
[buymeacoffee-shield]: https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png
> \[!IMPORTANT]
>
> * When using `files_yaml*` inputs:
> * All keys must start with a letter or `_` and contain only alphanumeric characters, `-`, or `_`.
> For example, `test` or `test_key` or `tesT-key` are all valid.
## Inputs ⚙️
<!-- AUTO-DOC-INPUT:START - Do not remove or modify this section -->
```yaml
- uses: tj-actions/changed-files@v40
id: changed-files
with:
# Github API URL.
# Type: string
# Default: "${{ github.api_url }}"
api_url: ''
# Specify a different base commit SHA or branch used
# for comparing changes
# Type: string
base_sha: ''
# 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.
# Type: boolean
# Default: "true"
diff_relative: ''
# Output unique changed directories instead of filenames. NOTE: This
# returns `.` for changed files located in the current
# working directory which defaults to `$GITHUB_WORKSPACE`.
# Type: boolean
# Default: "false"
dir_names: ''
# 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`.
# Type: boolean
# Default: "false"
dir_names_deleted_files_include_only_deleted_dirs: ''
# Exclude the current directory represented by `.` from the
# output when `dir_names` is set to `true`.
# Type: boolean
# Default: "false"
dir_names_exclude_current_dir: ''
# 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.
# Type: string
dir_names_include_files: ''
# Separator used to split the `dir_names_include_files` input
# Type: string
# Default: "\n"
dir_names_include_files_separator: ''
# Limit the directory output to a maximum depth e.g
# `test/test1/test2` with max depth of `2` returns `test/test1`.
# Type: string
dir_names_max_depth: ''
# Escape JSON output.
# Type: boolean
# Default: "true"
escape_json: ''
# Fail when the initial diff fails.
# Type: boolean
# Default: "false"
fail_on_initial_diff_error: ''
# Fail when the submodule diff fails.
# Type: boolean
# Default: "false"
fail_on_submodule_diff_error: ''
# Fetch additional history for submodules.
# Type: boolean
# Default: "false"
fetch_additional_submodule_history: ''
# Depth of additional branch history fetched. NOTE: This can
# be adjusted to resolve errors with insufficient history.
# Type: string
# Default: "50"
fetch_depth: ''
# File and directory patterns used to detect changes (Defaults to the entire repo if unset).
# NOTE: Multiline file/directory patterns should not include quotes.
# Type: string
files: ''
# Source file(s) used to populate the `files` input.
# Type: string
files_from_source_file: ''
# Separator used to split the `files_from_source_file` input.
# Type: string
# Default: "\n"
files_from_source_file_separator: ''
# Ignore changes to these file(s). NOTE: Multiline file/directory patterns
# should not include quotes.
# Type: string
files_ignore: ''
# Source file(s) used to populate the `files_ignore` input
# Type: string
files_ignore_from_source_file: ''
# Separator used to split the `files_ignore_from_source_file` input
# Type: string
# Default: "\n"
files_ignore_from_source_file_separator: ''
# Separator used to split the `files_ignore` input
# Type: string
# Default: "\n"
files_ignore_separator: ''
# YAML used to define a set of file patterns
# to ignore changes
# Type: string
files_ignore_yaml: ''
# 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
# Type: string
files_ignore_yaml_from_source_file: ''
# Separator used to split the `files_ignore_yaml_from_source_file` input
# Type: string
# Default: "\n"
files_ignore_yaml_from_source_file_separator: ''
# Separator used to split the `files` input
# Type: string
# Default: "\n"
files_separator: ''
# YAML used to define a set of file patterns
# to detect changes
# Type: string
files_yaml: ''
# Source file(s) used to populate the `files_yaml` input. Example:
# https://github.com/tj-actions/changed-files/blob/main/test/changed-files.yml
# Type: string
files_yaml_from_source_file: ''
# Separator used to split the `files_yaml_from_source_file` input
# Type: string
# Default: "\n"
files_yaml_from_source_file_separator: ''
# Include `all_old_new_renamed_files` output. Note this can generate a large
# output See: #501.
# Type: boolean
# Default: "false"
include_all_old_new_renamed_files: ''
# 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
# Type: boolean
# Default: "false"
json: ''
# Apply the negation patterns first. NOTE: This affects how
# changed files are matched.
# Type: boolean
# Default: "false"
negation_patterns_first: ''
# Split character for old and new renamed filename pairs.
# Type: string
# Default: " "
old_new_files_separator: ''
# Split character for old and new filename pairs.
# Type: string
# Default: ","
old_new_separator: ''
# Directory to store output files.
# Type: string
# Default: ".github/outputs"
output_dir: ''
# Output renamed files as deleted and added files.
# Type: boolean
# Default: "false"
output_renamed_files_as_deleted_and_added: ''
# Specify a relative path under `$GITHUB_WORKSPACE` to locate the
# repository.
# Type: string
# Default: "."
path: ''
# Use non-ASCII characters to match files and output the
# filenames completely verbatim by setting this to `false`
# Type: boolean
# Default: "true"
quotepath: ''
# Recover deleted files.
# Type: boolean
# Default: "false"
recover_deleted_files: ''
# Recover deleted files to a new destination directory, defaults
# to the original location.
# Type: string
recover_deleted_files_to_destination: ''
# 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.
# Type: string
recover_files: ''
# File and directory patterns to ignore when recovering deleted
# files.
# Type: string
recover_files_ignore: ''
# Separator used to split the `recover_files_ignore` input
# Type: string
# Default: "\n"
recover_files_ignore_separator: ''
# Separator used to split the `recover_files` input
# Type: string
# Default: "\n"
recover_files_separator: ''
# Split character for output strings.
# Type: string
# Default: " "
separator: ''
# Specify a different commit SHA or branch used for
# comparing changes
# Type: string
sha: ''
# Get changed files for commits whose timestamp is older
# than the given time.
# Type: string
since: ''
# Use the last commit on the remote branch as
# the `base_sha`. Defaults to the last non-merge commit on
# the target branch for pull request events and the
# previous remote commit of the current branch for push
# events.
# Type: boolean
# Default: "false"
since_last_remote_commit: ''
# 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.
# Type: boolean
# Default: "false"
skip_initial_fetch: ''
# GitHub token used to fetch changed files from Github's
# API.
# Type: string
# Default: "${{ github.token }}"
token: ''
# Get changed files for commits whose timestamp is earlier
# than the given time.
# Type: string
until: ''
# 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`.
# Type: boolean
# Default: "false"
write_output_files: ''
```
<!-- AUTO-DOC-INPUT:END -->
## Useful Acronyms 🧮
| Acronym | Meaning |
@@ -309,10 +609,12 @@ Support this project with a :star:
| U | Unmerged |
| X | Unknown |
> **Warning**
> \[!IMPORTANT]
>
> * When using `files_yaml*` inputs ensure all outputs are prefixed by the key `test_{...}` e.g. `test_added_files`, `test_any_changed`
> * All keys must start with a letter or \_ and contain only alphanumeric characters, -, or \_.
> * When using `files_yaml*` inputs:
> * it's required to prefix all outputs with the key to ensure that the correct outputs are accessible.
>
> For example, if you use `test` as the key, you can access outputs like `added_files`, `any_changed`, and so on by prefixing them with the key `test_added_files` or `test_any_changed` etc.
## Outputs 📤
@@ -361,65 +663,6 @@ Support this project with a :star:
<!-- AUTO-DOC-OUTPUT:END -->
## Inputs ⚙️
<!-- AUTO-DOC-INPUT:START - Do not remove or modify this section -->
| INPUT | TYPE | REQUIRED | DEFAULT | DESCRIPTION |
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------|----------|---------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| <a name="input_api_url"></a>[api\_url](#input_api_url) | string | false | `"${{ github.api_url }}"` | Github API URL. |
| <a name="input_base_sha"></a>[base\_sha](#input_base_sha) | string | false | | Specify a different base commit <br>SHA or branch used for <br>comparing changes |
| <a name="input_diff_relative"></a>[diff\_relative](#input_diff_relative) | string | false | `"true"` | Exclude changes outside the current <br>directory and show path names <br>relative to it. **NOTE:** This <br>requires you to specify the <br>top level directory via the <br>`path` input. |
| <a name="input_dir_names"></a>[dir\_names](#input_dir_names) | string | false | `"false"` | Output unique changed directories instead <br>of filenames. **NOTE:** This returns <br>`.` for changed files located <br>in the current working directory <br>which defaults to `$GITHUB_WORKSPACE`. |
| <a name="input_dir_names_deleted_files_include_only_deleted_dirs"></a>[dir\_names\_deleted\_files\_include\_only\_deleted\_dirs](#input_dir_names_deleted_files_include_only_deleted_dirs) | string | false | `"false"` | Include only directories that have <br>been deleted as opposed to <br>directory names of files that <br>have been deleted in the <br>`deleted_files` output when `dir_names` is <br>set to `true`. |
| <a name="input_dir_names_exclude_current_dir"></a>[dir\_names\_exclude\_current\_dir](#input_dir_names_exclude_current_dir) | string | false | `"false"` | Exclude the current directory represented <br>by `.` from the output <br>when `dir_names` is set to <br>`true`. |
| <a name="input_dir_names_include_files"></a>[dir\_names\_include\_files](#input_dir_names_include_files) | string | false | | File and directory patterns to <br>include in the output when <br>`dir_names` is set to `true`. <br>**NOTE:** This returns only the <br>matching files and also the <br>directory names. |
| <a name="input_dir_names_include_files_separator"></a>[dir\_names\_include\_files\_separator](#input_dir_names_include_files_separator) | string | false | `"\n"` | Separator used to split the <br>`dir_names_include_files` input |
| <a name="input_dir_names_max_depth"></a>[dir\_names\_max\_depth](#input_dir_names_max_depth) | string | false | | Limit the directory output to <br>a maximum depth e.g `test/test1/test2` <br>with max depth of `2` <br>returns `test/test1`. |
| <a name="input_escape_json"></a>[escape\_json](#input_escape_json) | string | false | `"true"` | Escape JSON output. |
| <a name="input_fail_on_initial_diff_error"></a>[fail\_on\_initial\_diff\_error](#input_fail_on_initial_diff_error) | string | false | `"false"` | Fail when the initial diff <br>fails. |
| <a name="input_fail_on_submodule_diff_error"></a>[fail\_on\_submodule\_diff\_error](#input_fail_on_submodule_diff_error) | string | false | `"false"` | Fail when the submodule diff <br>fails. |
| <a name="input_fetch_additional_submodule_history"></a>[fetch\_additional\_submodule\_history](#input_fetch_additional_submodule_history) | string | false | `"false"` | Fetch additional history for submodules. |
| <a name="input_fetch_depth"></a>[fetch\_depth](#input_fetch_depth) | string | false | `"50"` | Depth of additional branch history <br>fetched. **NOTE**: This can be <br>adjusted to resolve errors with <br>insufficient history. |
| <a name="input_files"></a>[files](#input_files) | string | false | | File and directory patterns used <br>to detect changes (Defaults to the entire repo if unset) **NOTE:** <br>Multiline file/directory patterns should not <br>include quotes. |
| <a name="input_files_from_source_file"></a>[files\_from\_source\_file](#input_files_from_source_file) | string | false | | Source file(s) used to populate <br>the `files` input. |
| <a name="input_files_from_source_file_separator"></a>[files\_from\_source\_file\_separator](#input_files_from_source_file_separator) | string | false | `"\n"` | Separator used to split the <br>`files_from_source_file` input |
| <a name="input_files_ignore"></a>[files\_ignore](#input_files_ignore) | string | false | | Ignore changes to these file(s) <br>**NOTE:** Multiline file/directory patterns should <br>not include quotes. |
| <a name="input_files_ignore_from_source_file"></a>[files\_ignore\_from\_source\_file](#input_files_ignore_from_source_file) | string | false | | Source file(s) used to populate <br>the `files_ignore` input |
| <a name="input_files_ignore_from_source_file_separator"></a>[files\_ignore\_from\_source\_file\_separator](#input_files_ignore_from_source_file_separator) | string | false | `"\n"` | Separator used to split the <br>`files_ignore_from_source_file` input |
| <a name="input_files_ignore_separator"></a>[files\_ignore\_separator](#input_files_ignore_separator) | string | false | `"\n"` | Separator used to split the <br>`files_ignore` input |
| <a name="input_files_ignore_yaml"></a>[files\_ignore\_yaml](#input_files_ignore_yaml) | string | false | | YAML used to define a <br>set of file patterns to <br>ignore changes |
| <a name="input_files_ignore_yaml_from_source_file"></a>[files\_ignore\_yaml\_from\_source\_file](#input_files_ignore_yaml_from_source_file) | string | false | | Source file(s) used to populate <br>the `files_ignore_yaml` input. [Example](https://github.com/tj-actions/changed-files/blob/main/test/changed-files.yml) |
| <a name="input_files_ignore_yaml_from_source_file_separator"></a>[files\_ignore\_yaml\_from\_source\_file\_separator](#input_files_ignore_yaml_from_source_file_separator) | string | false | `"\n"` | Separator used to split the <br>`files_ignore_yaml_from_source_file` input |
| <a name="input_files_separator"></a>[files\_separator](#input_files_separator) | string | false | `"\n"` | Separator used to split the <br>`files` input |
| <a name="input_files_yaml"></a>[files\_yaml](#input_files_yaml) | string | false | | YAML used to define a <br>set of file patterns to <br>detect changes |
| <a name="input_files_yaml_from_source_file"></a>[files\_yaml\_from\_source\_file](#input_files_yaml_from_source_file) | string | false | | Source file(s) used to populate <br>the `files_yaml` input. [Example](https://github.com/tj-actions/changed-files/blob/main/test/changed-files.yml) |
| <a name="input_files_yaml_from_source_file_separator"></a>[files\_yaml\_from\_source\_file\_separator](#input_files_yaml_from_source_file_separator) | string | false | `"\n"` | Separator used to split the <br>`files_yaml_from_source_file` input |
| <a name="input_include_all_old_new_renamed_files"></a>[include\_all\_old\_new\_renamed\_files](#input_include_all_old_new_renamed_files) | string | false | `"false"` | Include `all_old_new_renamed_files` output. Note this <br>can generate a large output <br>See: [#501](https://github.com/tj-actions/changed-files/issues/501). |
| <a name="input_json"></a>[json](#input_json) | string | false | `"false"` | Output list of changed files <br>in a JSON formatted string <br>which can be used for <br>matrix jobs. [Example](https://github.com/tj-actions/changed-files/blob/main/.github/workflows/matrix-test.yml) |
| <a name="input_old_new_files_separator"></a>[old\_new\_files\_separator](#input_old_new_files_separator) | string | false | `" "` | Split character for old and <br>new renamed filename pairs. |
| <a name="input_old_new_separator"></a>[old\_new\_separator](#input_old_new_separator) | string | false | `","` | Split character for old and <br>new filename pairs. |
| <a name="input_output_dir"></a>[output\_dir](#input_output_dir) | string | false | `".github/outputs"` | Directory to store output files. |
| <a name="input_output_renamed_files_as_deleted_and_added"></a>[output\_renamed\_files\_as\_deleted\_and\_added](#input_output_renamed_files_as_deleted_and_added) | string | false | `"false"` | Output renamed files as deleted <br>and added files. |
| <a name="input_path"></a>[path](#input_path) | string | false | `"."` | Specify a relative path under <br>`$GITHUB_WORKSPACE` to locate the repository. |
| <a name="input_quotepath"></a>[quotepath](#input_quotepath) | string | false | `"true"` | Use non-ascii characters to match <br>files and output the filenames <br>completely verbatim by setting this <br>to `false` |
| <a name="input_recover_deleted_files"></a>[recover\_deleted\_files](#input_recover_deleted_files) | string | false | `"false"` | Recover deleted files. |
| <a name="input_recover_deleted_files_to_destination"></a>[recover\_deleted\_files\_to\_destination](#input_recover_deleted_files_to_destination) | string | false | | Recover deleted files to a <br>new destination directory, defaults to <br>the original location. |
| <a name="input_recover_files"></a>[recover\_files](#input_recover_files) | string | false | | File and directory patterns used <br>to recover deleted files, defaults <br>to the patterns provided via <br>the `files`, `files_from_source_file`, `files_ignore` and <br>`files_ignore_from_source_file` inputs or all deleted <br>files if no patterns are <br>provided. |
| <a name="input_recover_files_ignore"></a>[recover\_files\_ignore](#input_recover_files_ignore) | string | false | | File and directory patterns to <br>ignore when recovering deleted files. |
| <a name="input_recover_files_ignore_separator"></a>[recover\_files\_ignore\_separator](#input_recover_files_ignore_separator) | string | false | `"\n"` | Separator used to split the <br>`recover_files_ignore` input |
| <a name="input_recover_files_separator"></a>[recover\_files\_separator](#input_recover_files_separator) | string | false | `"\n"` | Separator used to split the <br>`recover_files` input |
| <a name="input_separator"></a>[separator](#input_separator) | string | false | `" "` | Split character for output strings |
| <a name="input_sha"></a>[sha](#input_sha) | string | false | | Specify a different commit SHA <br>or branch used for comparing <br>changes |
| <a name="input_since"></a>[since](#input_since) | string | false | | Get changed files for commits <br>whose timestamp is older than <br>the given time. |
| <a name="input_since_last_remote_commit"></a>[since\_last\_remote\_commit](#input_since_last_remote_commit) | string | false | `"false"` | Use the last commit on <br>the remote branch as the <br>`base_sha`. Defaults to the last <br>non-merge commit on the target <br>branch for pull request events <br>and the previous remote commit <br>of the current branch for <br>push events. |
| <a name="input_skip_initial_fetch"></a>[skip\_initial\_fetch](#input_skip_initial_fetch) | string | false | `"false"` | Skip the initial fetch to <br>improve performance for shallow repositories. <br>**NOTE**: This could lead to <br>errors with missing history and <br>the intended use is limited <br>to when you've fetched the <br>history necessary to perform the <br>diff. |
| <a name="input_token"></a>[token](#input_token) | string | false | `"${{ github.token }}"` | Github token used to fetch <br>changed files from Github's API. |
| <a name="input_until"></a>[until](#input_until) | string | false | | Get changed files for commits <br>whose timestamp is earlier than <br>the given time. |
| <a name="input_write_output_files"></a>[write\_output\_files](#input_write_output_files) | string | false | `"false"` | Write outputs to the `output_dir` <br>defaults to `.github/outputs` folder. **NOTE:** <br>This creates a `.txt` file <br>by default and a `.json` <br>file if `json` is set <br>to `true`. |
<!-- AUTO-DOC-INPUT:END -->
## Versioning 🏷️
This GitHub Action follows the principles of [Semantic Versioning](https://semver.org) for versioning releases.
@@ -938,7 +1181,7 @@ And many more...
## Important Notice ⚠️
> **Important**
> \[!IMPORTANT]
>
> * Spaces in file names can introduce bugs when using bash loops. See: [#216](https://github.com/tj-actions/changed-files/issues/216)
> However, this action will handle spaces in file names, with a recommendation of using a separator to prevent any hidden issues.
@@ -1025,6 +1268,9 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
<td align="center" valign="top" width="14.28%"><a href="https://github.com/albertoperdomo2"><img src="https://avatars.githubusercontent.com/u/62241095?v=4?s=100" width="100px;" alt="Alberto Perdomo"/><br /><sub><b>Alberto Perdomo</b></sub></a><br /><a href="https://github.com/tj-actions/changed-files/commits?author=albertoperdomo2" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://arthurvolant.com"><img src="https://avatars.githubusercontent.com/u/37664438?v=4?s=100" width="100px;" alt="Arthur"/><br /><sub><b>Arthur</b></sub></a><br /><a href="https://github.com/tj-actions/changed-files/issues?q=author%3AV0lantis" title="Bug reports">🐛</a> <a href="https://github.com/tj-actions/changed-files/commits?author=V0lantis" title="Code">💻</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/rodrigorfk"><img src="https://avatars.githubusercontent.com/u/1995033?v=4?s=100" width="100px;" alt="Rodrigo Fior Kuntzer"/><br /><sub><b>Rodrigo Fior Kuntzer</b></sub></a><br /><a href="https://github.com/tj-actions/changed-files/commits?author=rodrigorfk" title="Code">💻</a> <a href="https://github.com/tj-actions/changed-files/commits?author=rodrigorfk" title="Tests">⚠️</a> <a href="https://github.com/tj-actions/changed-files/issues?q=author%3Arodrigorfk" title="Bug reports">🐛</a></td>
</tr>
</tbody>
</table>

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:
@@ -94,16 +96,16 @@ inputs:
required: false
default: "."
quotepath:
description: "Use non-ascii characters to match files and output the filenames completely verbatim by setting this to `false`"
description: "Use non-ASCII characters to match files and output the filenames completely verbatim by setting this to `false`"
default: "true"
required: false
diff_relative:
description: "Exclude changes outside the current directory and show path names relative to it. **NOTE:** This requires you to specify the top level directory via the `path` input."
description: "Exclude changes outside the current directory and show path names relative to it. NOTE: This requires you to specify the top-level directory via the `path` input."
required: false
default: "true"
dir_names:
default: "false"
description: "Output unique changed directories instead of filenames. **NOTE:** This returns `.` for changed files located in the current working directory which defaults to `$GITHUB_WORKSPACE`."
description: "Output unique changed directories instead of filenames. NOTE: This returns `.` for changed files located in the current working directory which defaults to `$GITHUB_WORKSPACE`."
required: false
dir_names_max_depth:
description: "Limit the directory output to a maximum depth e.g `test/test1/test2` with max depth of `2` returns `test/test1`."
@@ -113,7 +115,7 @@ inputs:
required: false
default: "false"
dir_names_include_files:
description: "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."
description: "File and directory patterns to include in the output when `dir_names` is set to `true`. NOTE: This returns only the matching files and also the directory names."
required: false
default: ""
dir_names_include_files_separator:
@@ -125,7 +127,7 @@ inputs:
required: false
default: "false"
json:
description: "Output list of changed files in a JSON formatted string which can be used for matrix jobs. [Example](https://github.com/tj-actions/changed-files/blob/main/.github/workflows/matrix-test.yml)"
description: "Output list of changed files in a JSON formatted string which can be used for matrix jobs. Example: https://github.com/tj-actions/changed-files/blob/main/.github/workflows/matrix-test.yml"
required: false
default: "false"
escape_json:
@@ -133,11 +135,13 @@ 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:
@@ -149,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:
@@ -169,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:
@@ -185,7 +192,7 @@ 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:
@@ -200,6 +207,10 @@ inputs:
description: "Fail when the submodule diff fails."
required: false
default: "false"
negation_patterns_first:
description: "Apply the negation patterns first. NOTE: This affects how changed files are matched."
required: false
default: "false"
outputs:
added_files:

4356
dist/index.js generated vendored

File diff suppressed because it is too large Load Diff

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long

25
dist/licenses.txt generated vendored
View File

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

View File

@@ -1,6 +1,6 @@
{
"name": "@tj-actions/changed-files",
"version": "40.0.1",
"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 **/*.ts --max-warnings 0",
"lint:fix": "eslint --fix src/**/*.ts",
"format": "prettier --write src/*.ts src/**/*.ts",
"format-check": "prettier --check src/*.ts src/**/*.ts",
"lint": "eslint src/*.ts src/**/*.ts --max-warnings 0",
"lint:fix": "eslint --fix src/*.ts src/**/*.ts",
"package": "ncc build lib/main.js --source-map --license licenses.txt",
"test": "jest --coverage",
"all": "yarn build && yarn format && yarn lint && yarn package && yarn test"

View File

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

View File

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

View File

@@ -51,6 +51,7 @@ export type Inputs = {
skipInitialFetch: boolean
failOnInitialDiffError: boolean
failOnSubmoduleDiffError: boolean
negationPatternsFirst: boolean
}
export const getInputs = (): Inputs => {
@@ -218,6 +219,13 @@ export const getInputs = (): Inputs => {
}
)
const negationPatternsFirst = core.getBooleanInput(
'negation_patterns_first',
{
required: false
}
)
const inputs: Inputs = {
files,
filesSeparator,
@@ -268,7 +276,8 @@ export const getInputs = (): Inputs => {
outputDir,
outputRenamedFilesAsDeletedAndAdded,
token,
apiUrl
apiUrl,
negationPatternsFirst
}
if (fetchDepth) {

View File

@@ -144,7 +144,9 @@ const getChangedFilesFromLocalGitHistory = async ({
workingDirectory,
deletedFiles: allDiffFiles[ChangeTypeEnum.Deleted],
recoverPatterns,
sha: diffResult.previousSha
diffResult,
hasSubmodule,
submodulePaths
})
}

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,6 +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'
@@ -771,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
}: {
@@ -938,90 +990,99 @@ export const getFilePatterns = async ({
inputs: Inputs
workingDirectory: string
}): Promise<string[]> => {
let filePatterns = ''
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(Boolean)
.map(p => path.join(workingDirectory, p))
core.debug(`files from source file: ${inputFilesFromSourceFile}`)
const filesFromSourceFiles = await getFilesFromSourceFile({
filePaths: inputFilesFromSourceFile
})
core.debug(
`files from source files patterns: ${filesFromSourceFiles.join('\n')}`
)
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.files) {
filePatterns = filePatterns.concat(
'\n',
inputs.files.split(inputs.filesSeparator).filter(Boolean).join('\n')
)
if (inputs.negationPatternsFirst) {
cleanedFilePatterns.sort((a, b) => {
return a.startsWith('!') ? -1 : b.startsWith('!') ? 1 : 0
})
}
if (inputs.filesFromSourceFile !== '') {
const inputFilesFromSourceFile = inputs.filesFromSourceFile
.split(inputs.filesFromSourceFileSeparator)
.filter(p => p !== '')
.map(p => path.join(workingDirectory, p))
core.debug(`files from source file: ${inputFilesFromSourceFile}`)
const filesFromSourceFiles = (
await getFilesFromSourceFile({filePaths: inputFilesFromSourceFile})
).join('\n')
core.debug(`files from source files patterns: ${filesFromSourceFiles}`)
filePatterns = filePatterns.concat('\n', filesFromSourceFiles)
}
if (isWindows()) {
filePatterns = filePatterns.replace(/\r\n/g, '\n')
filePatterns = filePatterns.replace(/\r/g, '\n')
}
const filePatternsArray = filePatterns.trim().split('\n').filter(Boolean)
// Reorder file patterns '**' should come before '!**/*.txt' and then the rest 'dir/**/*.txt'
if (filePatternsArray.includes('**')) {
filePatternsArray.sort((a, b) => {
// Reorder file patterns '**' should come first
if (cleanedFilePatterns.includes('**')) {
cleanedFilePatterns.sort((a, b) => {
return a === '**' ? -1 : b === '**' ? 1 : 0
})
}
core.debug(`Input file patterns: \n${filePatternsArray.join('\n')}`)
if (isWindows()) {
cleanedFilePatterns = cleanedFilePatterns.map(pattern =>
pattern.replace(/\r\n/g, '\n').replace(/\r/g, '\n')
)
}
return filePatternsArray
core.debug(`Input file patterns: \n${cleanedFilePatterns.join('\n')}`)
return cleanedFilePatterns
}
// Example YAML input:
@@ -1335,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}`)
@@ -1366,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}"`)
}
}

846
yarn.lock

File diff suppressed because it is too large Load Diff