From 9787b17bd1380d2b5230135715bb8e0efcc2617d Mon Sep 17 00:00:00 2001 From: Aosen Xiong Date: Tue, 31 Dec 2024 14:15:21 -0800 Subject: [PATCH] Use correct commit range for GitHub Actions (#10) --- ci-info | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci-info b/ci-info index f7fb19b..8b52c9d 100755 --- a/ci-info +++ b/ci-info @@ -247,8 +247,8 @@ elif [ -n "$GITHUB_HEAD_REF" ] ; then # GitHub Actions pull request (no special handling is required for non-PR GitHub Actions jobs). CI_IS_PULL_REQUEST=true CI_BRANCH_NAME="${GITHUB_HEAD_REF}" - CI_COMMIT_RANGE_START=$(git rev-parse "${GITHUB_BASE_REF}") - CI_COMMIT_RANGE_END=$(git rev-parse "${GITHUB_HEAD_REF}") + CI_COMMIT_RANGE_START=$(git rev-parse "remotes/origin/${GITHUB_BASE_REF}") + CI_COMMIT_RANGE_END=$(git rev-parse "remotes/pull/${GITHUB_REF_NAME}") CI_COMMIT_RANGE="${CI_COMMIT_RANGE_START}...${CI_COMMIT_RANGE_END}" else