From a14f1bec0b3254e650d35e8792272f8955ded143 Mon Sep 17 00:00:00 2001 From: Kyle Robbertze Date: Fri, 10 Jan 2025 16:56:39 +0000 Subject: [PATCH] ci: only check last commit for API schema in PRs (#3133) ### Description PRs are intended to be squashed to a single commit. Only checking the last commit gives us the intended state of the repo and ensures that if the author commits the schema fixes later, the CI passes as expected. Currently, the CI will fail because the earlier commits still have an out of date schema. --- .github/workflows/api-schema.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/api-schema.yml b/.github/workflows/api-schema.yml index a2519a65f..d79f1fd7d 100644 --- a/.github/workflows/api-schema.yml +++ b/.github/workflows/api-schema.yml @@ -42,7 +42,7 @@ jobs: - name: Get pull request commit range if: github.event_name == 'pull_request' - run: echo "COMMIT_RANGE=origin/${{ github.base_ref }}..${{ github.sha }}" >> $GITHUB_ENV + run: echo "COMMIT_RANGE=${{ github.sha }}~1...${{ github.sha }}" >> $GITHUB_ENV - name: Get push commit range if: github.event_name == 'push'