mirror of
https://github.com/tj-actions/changed-files
synced 2024-12-17 13:47:20 +00:00
Updated to use merge-base
This commit is contained in:
parent
f282e19e52
commit
ef8591de30
1 changed files with 6 additions and 2 deletions
|
@ -200,8 +200,12 @@ else
|
||||||
PREVIOUS_SHA=$(git rev-parse origin/"$CURRENT_BRANCH" 2>&1) && exit_status=$? || exit_status=$?
|
PREVIOUS_SHA=$(git rev-parse origin/"$CURRENT_BRANCH" 2>&1) && exit_status=$? || exit_status=$?
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
PREVIOUS_SHA=$GITHUB_EVENT_PULL_REQUEST_BASE_SHA && exit_status=$? || exit_status=$?
|
PREVIOUS_SHA=$(git merge-base "$TARGET_BRANCH" "$CURRENT_SHA" 2>&1) && exit_status=$? || exit_status=$?
|
||||||
|
|
||||||
|
if [[ -z "$PREVIOUS_SHA" ]]; then
|
||||||
|
PREVIOUS_SHA=$GITHUB_EVENT_PULL_REQUEST_BASE_SHA && exit_status=$? || exit_status=$?
|
||||||
|
fi
|
||||||
|
|
||||||
if ! git diff --name-only --ignore-submodules=all "$PREVIOUS_SHA"..."$CURRENT_SHA" 1>/dev/null 2>&1; then
|
if ! git diff --name-only --ignore-submodules=all "$PREVIOUS_SHA"..."$CURRENT_SHA" 1>/dev/null 2>&1; then
|
||||||
PREVIOUS_SHA=$(git rev-parse origin/"$TARGET_BRANCH" 2>&1) && exit_status=$? || exit_status=$?
|
PREVIOUS_SHA=$(git rev-parse origin/"$TARGET_BRANCH" 2>&1) && exit_status=$? || exit_status=$?
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue