Rename changed_files to type_changed_files (#109)

This commit is contained in:
Tonye Jack 2021-06-18 19:28:02 -04:00 committed by GitHub
parent d290bdd91e
commit 0754fdabe3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 10 deletions

View File

@ -86,7 +86,7 @@ jobs:
| deleted_files | `string` | `'new.txt path/to/file.png ...'` | Select only files that are Deleted (D) | | deleted_files | `string` | `'new.txt path/to/file.png ...'` | Select only files that are Deleted (D) |
| modified_files | `string` | `'new.txt path/to/file.png ...'` | Select only files that are Modified (M) | | modified_files | `string` | `'new.txt path/to/file.png ...'` | Select only files that are Modified (M) |
| renamed_files | `string` | `'new.txt path/to/file.png ...'` | Select only files that are Renamed (R) | | renamed_files | `string` | `'new.txt path/to/file.png ...'` | Select only files that are Renamed (R) |
| changed_files | `string` | `'new.txt path/to/file.png ...'` | Select only files that have their file type changed (T) | | type_changed_files | `string` | `'new.txt path/to/file.png ...'` | Select only files that have their file type changed (T) |
| unmerged_files | `string` | `'new.txt path/to/file.png ...'` | Select only files that are Unmerged (U) | | unmerged_files | `string` | `'new.txt path/to/file.png ...'` | Select only files that are Unmerged (U) |
| unknown_files | `string` | `'new.txt path/to/file.png ...'` | Select only files that are Unknown (X) | | unknown_files | `string` | `'new.txt path/to/file.png ...'` | Select only files that are Unknown (X) |

View File

@ -31,9 +31,9 @@ outputs:
renamed_files: renamed_files:
description: List of renamed files. description: List of renamed files.
value: ${{ steps.changed-files.outputs.renamed_files }} value: ${{ steps.changed-files.outputs.renamed_files }}
changed_files: type_changed_files:
description: List of changed files. description: List of files that had type changes.
value: ${{ steps.changed-files.outputs.changed_files }} value: ${{ steps.changed-files.outputs.type_changed_files }}
unmerged_files: unmerged_files:
description: List of unmerged files. description: List of unmerged files.
value: ${{ steps.changed-files.outputs.unmerged_files }} value: ${{ steps.changed-files.outputs.unmerged_files }}

View File

@ -45,7 +45,7 @@ if [[ -z "$INPUT_FILES" ]]; then
DELETED=$(git diff --diff-filter=D --name-only "$PREV_SHA" "$CURR_SHA" | tr "\n" "$INPUT_SEPARATOR" | sed -E "s/($INPUT_SEPARATOR)$//") DELETED=$(git diff --diff-filter=D --name-only "$PREV_SHA" "$CURR_SHA" | tr "\n" "$INPUT_SEPARATOR" | sed -E "s/($INPUT_SEPARATOR)$//")
MODIFIED=$(git diff --diff-filter=M --name-only "$PREV_SHA" "$CURR_SHA" | tr "\n" "$INPUT_SEPARATOR" | sed -E "s/($INPUT_SEPARATOR)$//") MODIFIED=$(git diff --diff-filter=M --name-only "$PREV_SHA" "$CURR_SHA" | tr "\n" "$INPUT_SEPARATOR" | sed -E "s/($INPUT_SEPARATOR)$//")
RENAMED=$(git diff --diff-filter=R --name-only "$PREV_SHA" "$CURR_SHA" | tr "\n" "$INPUT_SEPARATOR" | sed -E "s/($INPUT_SEPARATOR)$//") RENAMED=$(git diff --diff-filter=R --name-only "$PREV_SHA" "$CURR_SHA" | tr "\n" "$INPUT_SEPARATOR" | sed -E "s/($INPUT_SEPARATOR)$//")
CHANGED=$(git diff --diff-filter=T --name-only "$PREV_SHA" "$CURR_SHA" | tr "\n" "$INPUT_SEPARATOR" | sed -E "s/($INPUT_SEPARATOR)$//") TYPE_CHANGED=$(git diff --diff-filter=T --name-only "$PREV_SHA" "$CURR_SHA" | tr "\n" "$INPUT_SEPARATOR" | sed -E "s/($INPUT_SEPARATOR)$//")
UNMERGED=$(git diff --diff-filter=U --name-only "$PREV_SHA" "$CURR_SHA" | tr "\n" "$INPUT_SEPARATOR" | sed -E "s/($INPUT_SEPARATOR)$//") UNMERGED=$(git diff --diff-filter=U --name-only "$PREV_SHA" "$CURR_SHA" | tr "\n" "$INPUT_SEPARATOR" | sed -E "s/($INPUT_SEPARATOR)$//")
UNKNOWN=$(git diff --diff-filter=X --name-only "$PREV_SHA" "$CURR_SHA" | tr "\n" "$INPUT_SEPARATOR" | sed -E "s/($INPUT_SEPARATOR)$//") UNKNOWN=$(git diff --diff-filter=X --name-only "$PREV_SHA" "$CURR_SHA" | tr "\n" "$INPUT_SEPARATOR" | sed -E "s/($INPUT_SEPARATOR)$//")
ALL_CHANGED=$(git diff --diff-filter="*ACDMRTUX" --name-only "$PREV_SHA" "$CURR_SHA" | tr "\n" "$INPUT_SEPARATOR" | sed -E "s/($INPUT_SEPARATOR)$//") ALL_CHANGED=$(git diff --diff-filter="*ACDMRTUX" --name-only "$PREV_SHA" "$CURR_SHA" | tr "\n" "$INPUT_SEPARATOR" | sed -E "s/($INPUT_SEPARATOR)$//")
@ -56,7 +56,7 @@ else
DELETED_ARRAY=() DELETED_ARRAY=()
MODIFIED_ARRAY=() MODIFIED_ARRAY=()
RENAMED_ARRAY=() RENAMED_ARRAY=()
CHANGED_ARRAY=() TYPE_CHANGED_ARRAY=()
UNMERGED_ARRAY=() UNMERGED_ARRAY=()
UNKNOWN_ARRAY=() UNKNOWN_ARRAY=()
ALL_CHANGED_ARRAY=() ALL_CHANGED_ARRAY=()
@ -76,7 +76,7 @@ else
# shellcheck disable=SC2207 # shellcheck disable=SC2207
RENAMED_ARRAY+=($(git diff --diff-filter=R --name-only "$PREV_SHA" "$CURR_SHA" | grep -E "(${path})" | xargs || true)) RENAMED_ARRAY+=($(git diff --diff-filter=R --name-only "$PREV_SHA" "$CURR_SHA" | grep -E "(${path})" | xargs || true))
# shellcheck disable=SC2207 # shellcheck disable=SC2207
CHANGED_ARRAY+=($(git diff --diff-filter=T --name-only "$PREV_SHA" "$CURR_SHA" | grep -E "(${path})" | xargs || true)) TYPE_CHANGED_ARRAY+=($(git diff --diff-filter=T --name-only "$PREV_SHA" "$CURR_SHA" | grep -E "(${path})" | xargs || true))
# shellcheck disable=SC2207 # shellcheck disable=SC2207
UNMERGED_ARRAY+=($(git diff --diff-filter=U --name-only "$PREV_SHA" "$CURR_SHA" | grep -E "(${path})" | xargs || true)) UNMERGED_ARRAY+=($(git diff --diff-filter=U --name-only "$PREV_SHA" "$CURR_SHA" | grep -E "(${path})" | xargs || true))
# shellcheck disable=SC2207 # shellcheck disable=SC2207
@ -98,7 +98,7 @@ else
# shellcheck disable=SC2001 # shellcheck disable=SC2001
RENAMED=$(echo "${RENAMED_ARRAY[*]}" | sed 's/ */'"$INPUT_SEPARATOR"'/g') RENAMED=$(echo "${RENAMED_ARRAY[*]}" | sed 's/ */'"$INPUT_SEPARATOR"'/g')
# shellcheck disable=SC2001 # shellcheck disable=SC2001
CHANGED=$(echo "${CHANGED_ARRAY[*]}" | sed 's/ */'"$INPUT_SEPARATOR"'/g') TYPE_CHANGED=$(echo "${TYPE_CHANGED_ARRAY[*]}" | sed 's/ */'"$INPUT_SEPARATOR"'/g')
# shellcheck disable=SC2001 # shellcheck disable=SC2001
UNMERGED=$(echo "${UNMERGED_ARRAY[*]}" | sed 's/ */'"$INPUT_SEPARATOR"'/g') UNMERGED=$(echo "${UNMERGED_ARRAY[*]}" | sed 's/ */'"$INPUT_SEPARATOR"'/g')
# shellcheck disable=SC2001 # shellcheck disable=SC2001
@ -114,7 +114,7 @@ echo "Copied files: $COPIED"
echo "Deleted files: $DELETED" echo "Deleted files: $DELETED"
echo "Modified files: $MODIFIED" echo "Modified files: $MODIFIED"
echo "Renamed files: $RENAMED" echo "Renamed files: $RENAMED"
echo "Changed files: $CHANGED" echo "Type Changed files: $TYPE_CHANGED"
echo "Unmerged files: $UNMERGED" echo "Unmerged files: $UNMERGED"
echo "Unknown files: $UNKNOWN" echo "Unknown files: $UNKNOWN"
echo "All changed files: $ALL_CHANGED" echo "All changed files: $ALL_CHANGED"
@ -138,7 +138,7 @@ echo "::set-output name=copied_files::$COPIED"
echo "::set-output name=deleted_files::$DELETED" echo "::set-output name=deleted_files::$DELETED"
echo "::set-output name=modified_files::$MODIFIED" echo "::set-output name=modified_files::$MODIFIED"
echo "::set-output name=renamed_files::$RENAMED" echo "::set-output name=renamed_files::$RENAMED"
echo "::set-output name=changed_files::$CHANGED" echo "::set-output name=type_changed_files::$TYPE_CHANGED"
echo "::set-output name=unmerged_files::$UNMERGED" echo "::set-output name=unmerged_files::$UNMERGED"
echo "::set-output name=unknown_files::$UNKNOWN" echo "::set-output name=unknown_files::$UNKNOWN"
echo "::set-output name=all_changed_files::$ALL_CHANGED" echo "::set-output name=all_changed_files::$ALL_CHANGED"