From d054676abf191c98e65d7c833ceedfda86c9854a Mon Sep 17 00:00:00 2001 From: Prajwal S N Date: Sat, 17 Jun 2023 00:32:40 +0530 Subject: [PATCH] fix(ci/check-size): use latest non-merge commit We were previously using the merge commit as the baseline, leading to all commits from the pull request being rebased, rather than just the latest commit. Signed-off-by: Prajwal S N --- .github/workflows/check-size.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/check-size.yml b/.github/workflows/check-size.yml index e0880d27..8bfc0c4c 100644 --- a/.github/workflows/check-size.yml +++ b/.github/workflows/check-size.yml @@ -23,4 +23,5 @@ jobs: - name: Configure base branch without switching current branch run: git fetch origin ${GITHUB_BASE_REF}:${GITHUB_BASE_REF} - name: Compare binary size change across each commit - run: git rebase -v ${GITHUB_BASE_REF}^ -x test/check-size.sh + # Use the last non-merge commit from the base branch as the baseline + run: git rebase -v $(git rev-list --no-merges -n 1 ${GITHUB_BASE_REF})^ -x test/check-size.sh