Compare commits

...

3 Commits
v9.2 ... v9.3

Author SHA1 Message Date
Tonye Jack
2a771ad30d Remove deleted files from the all_modified_files output (#156) 2021-08-09 08:57:25 -04:00
Tonye Jack
11048977f0 Update README.md 2021-08-07 01:13:45 -04:00
Tonye Jack
b5198a4764 Upgraded from v9.1 -> v9.2 (#154)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2021-08-06 07:13:33 -04:00
3 changed files with 35 additions and 16 deletions

View File

@@ -1,5 +1,27 @@
# Changelog
## [Unreleased](https://github.com/tj-actions/changed-files/tree/HEAD)
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v9.2...HEAD)
**Fixed bugs:**
- \[BUG\] Dedupe the output list of changed files [\#151](https://github.com/tj-actions/changed-files/issues/151)
## [v9.2](https://github.com/tj-actions/changed-files/tree/v9.2) (2021-08-06)
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v9.1...v9.2)
**Closed issues:**
- Dependency Dashboard [\#27](https://github.com/tj-actions/changed-files/issues/27)
**Merged pull requests:**
- Dedupe output file names. [\#153](https://github.com/tj-actions/changed-files/pull/153) ([jackton1](https://github.com/jackton1))
- Update tj-actions/branch-names action to v4.8 [\#152](https://github.com/tj-actions/changed-files/pull/152) ([renovate[bot]](https://github.com/apps/renovate))
- Upgraded to v9.1 [\#150](https://github.com/tj-actions/changed-files/pull/150) ([jackton1](https://github.com/jackton1))
## [v9.1](https://github.com/tj-actions/changed-files/tree/v9.1) (2021-07-30)
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v9...v9.1)
@@ -8,10 +30,6 @@
- \[Feature\] any\_changed doesn't capture changes due to deleting files [\#148](https://github.com/tj-actions/changed-files/issues/148)
**Closed issues:**
- Dependency Dashboard [\#27](https://github.com/tj-actions/changed-files/issues/27)
**Merged pull requests:**
- Detect deleted files via any\_changed output [\#149](https://github.com/tj-actions/changed-files/pull/149) ([jackton1](https://github.com/jackton1))

View File

@@ -56,7 +56,7 @@ jobs:
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v9.1
uses: tj-actions/changed-files@v9.2
- name: List all modified files
run: |
@@ -114,11 +114,11 @@ jobs:
- name: Get changed files using defaults
id: changed-files
uses: tj-actions/changed-files@v9.1
uses: tj-actions/changed-files@v9.2
- name: Get changed files using a comma separator
id: changed-files-comma
uses: tj-actions/changed-files@v9.1
uses: tj-actions/changed-files@v9.2
with:
separator: ","
@@ -140,13 +140,14 @@ jobs:
- name: Get specific changed files
id: changed-files-specific
uses: tj-actions/changed-files@v9.1
uses: tj-actions/changed-files@v9.2
with:
files: |
my-file.txt
test.txt
new.txt
test_directory
*.sh
.(png|jpeg)$
.(sql)$
^(mynewfile|custom)
@@ -163,14 +164,14 @@ jobs:
- name: Use a source file or list of file(s) to populate to files input.
id: changed-files-specific-source-file
uses: tj-actions/changed-files@v9.1
uses: tj-actions/changed-files@v9.2
with:
files_from_source_file: |
test/changed-files-list.txt
- name: Use a source file or list of file(s) to populate to files input and optionally specify more files.
id: changed-files-specific-source-file-and-specify-files
uses: tj-actions/changed-files@v9.1
uses: tj-actions/changed-files@v9.2
with:
files_from_source_file: |
test/changed-files-list.txt
@@ -179,13 +180,13 @@ jobs:
- name: Use a different commit SHA
id: changed-files-custom-sha
uses: tj-actions/changed-files@v9.1
uses: tj-actions/changed-files@v9.2
with:
sha: ${{ github.event.pull_request.head.sha }}
- name: Use a different base SHA
id: changed-files-custom-base-sha
uses: tj-actions/changed-files@v9.1
uses: tj-actions/changed-files@v9.2
with:
base_sha: "2096ed0"
@@ -202,7 +203,7 @@ jobs:
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v9.1
uses: tj-actions/changed-files@v9.2
- name: Pre-commit
uses: pre-commit/action@v2.0.0

View File

@@ -64,7 +64,7 @@ if [[ -z "$UNIQUE_FILES" ]]; then
UNMERGED=$(git diff --diff-filter=U --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | tr "\n" "$INPUT_SEPARATOR" | sed -E "s/($INPUT_SEPARATOR)$//")
UNKNOWN=$(git diff --diff-filter=X --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | tr "\n" "$INPUT_SEPARATOR" | sed -E "s/($INPUT_SEPARATOR)$//")
ALL_CHANGED=$(git diff --diff-filter="*ACDMRTUX" --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | tr "\n" "$INPUT_SEPARATOR" | sed -E "s/($INPUT_SEPARATOR)$//")
ALL_MODIFIED_FILES=$(git diff --diff-filter="ACMDR" --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | tr "\n" "$INPUT_SEPARATOR" | sed -E "s/($INPUT_SEPARATOR)$//")
ALL_MODIFIED_FILES=$(git diff --diff-filter="ACMR" --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | tr "\n" "$INPUT_SEPARATOR" | sed -E "s/($INPUT_SEPARATOR)$//")
else
ADDED_ARRAY=()
COPIED_ARRAY=()
@@ -100,7 +100,7 @@ else
# shellcheck disable=SC2207
ALL_CHANGED_ARRAY+=($(git diff --diff-filter="*ACDMRTUX" --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | grep -E "(${path})" | xargs || true))
# shellcheck disable=SC2207
ALL_MODIFIED_FILES_ARRAY+=($(git diff --diff-filter="ACMDR" --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | grep -E "(${path})" | xargs || true))
ALL_MODIFIED_FILES_ARRAY+=($(git diff --diff-filter="ACMR" --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | grep -E "(${path})" | xargs || true))
done
# shellcheck disable=SC2001
@@ -139,7 +139,7 @@ echo "All modified files: $ALL_MODIFIED_FILES"
if [[ -n "$UNIQUE_FILES" ]]; then
# shellcheck disable=SC2001
ALL_INPUT_FILES=$(echo "$UNIQUE_FILES" | tr "\n" " " | xargs)
ALL_OTHER_CHANGED_FILES=$(git diff --diff-filter="ACMDR" --name-only "$PREVIOUS_SHA" "$CURRENT_SHA")
ALL_OTHER_CHANGED_FILES=$(git diff --diff-filter="ACMR" --name-only "$PREVIOUS_SHA" "$CURRENT_SHA")
OTHER_CHANGED_FILES=$(echo "${ALL_OTHER_CHANGED_FILES[@]}" "${ALL_MODIFIED_FILES[@]}" | tr ' ' '\n' | sort | uniq -u | tr "\n" " " | xargs)