Skip to content

Commit

Permalink
try with branch name
Browse files Browse the repository at this point in the history
  • Loading branch information
cgundy committed Oct 3, 2024
1 parent a02d994 commit 89e058b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ci/bazel-scripts/diff.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ set -x
cd "$(git rev-parse --show-toplevel)"

MERGE_BASE="${MERGE_BASE_SHA:-HEAD}"
CURRENT_BRANCH_HEAD_SHA=$(git rev-parse HEAD)
# we can't use CI_COMMIT_SHA here because that is the merge commit which contains more changes
CURRENT_BRANCH_HEAD_SHA=$(git rev-parse origin/"$BRANCH_NAME")
COMMIT_RANGE=${COMMIT_RANGE:-$MERGE_BASE".."$CURRENT_BRANCH_HEAD_SHA}
DIFF_FILES=$(git diff --name-only "${COMMIT_RANGE}")

Expand Down

0 comments on commit 89e058b

Please sign in to comment.