bugfix: #900
This commit is contained in:
Lukas Gravley 2020-10-27 13:47:22 -05:00 committed by GitHub
commit 18915fe6a9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -53,16 +53,35 @@ function BuildFileList() {
fatal "[${SWITCH_CMD}]" fatal "[${SWITCH_CMD}]"
fi fi
################ if [ "${GITHUB_EVENT_NAME}" == "push" ]; then
# print header # ################
################ # push event #
debug "----------------------------------------------" ################
debug "Generating Diff with:[git diff --name-only '${DEFAULT_BRANCH}...${GITHUB_SHA}' --diff-filter=d]" ################
# print header #
################
debug "----------------------------------------------"
debug "Generating Diff with:[git diff-tree --no-commit-id --name-only -r \"${GITHUB_SHA}]\""
################################################# #################################################
# Get the Array of files changed in the commits # # Get the Array of files changed in the commits #
################################################# #################################################
mapfile -t RAW_FILE_ARRAY < <(git -C "${GITHUB_WORKSPACE}" diff --name-only "${DEFAULT_BRANCH}...${GITHUB_SHA}" --diff-filter=d 2>&1) mapfile -t RAW_FILE_ARRAY < <(git diff-tree --no-commit-id --name-only -r "${GITHUB_SHA}" 2>&1)
else
################
# PR event #
################
################
# print header #
################
debug "----------------------------------------------"
debug "Generating Diff with:[git diff --name-only '${DEFAULT_BRANCH}...${GITHUB_SHA}' --diff-filter=d]"
#################################################
# Get the Array of files changed in the commits #
#################################################
mapfile -t RAW_FILE_ARRAY < <(git -C "${GITHUB_WORKSPACE}" diff --name-only "${DEFAULT_BRANCH}...${GITHUB_SHA}" --diff-filter=d 2>&1)
fi
else else
WORKSPACE_PATH="${GITHUB_WORKSPACE}" WORKSPACE_PATH="${GITHUB_WORKSPACE}"
if [ "${TEST_CASE_RUN}" == "true" ]; then if [ "${TEST_CASE_RUN}" == "true" ]; then