From d59f5ad130799ff10039c8395f921e4c438de3cc Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Mon, 14 Oct 2024 15:42:10 -0700 Subject: [PATCH] Fix missing changeset CI PR check (#1080) --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9554aed8d8..2ea33e02b6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -64,7 +64,7 @@ jobs: - name: Check for missing changesets run: | PR_CHANGESETS=$(ls .changeset | (grep -v -E 'README\.md|config\.json' || true) | wc -l) - MAIN_CHANGESETS=$(git ls-tree -r origin/main .changeset | (grep -v -E 'README\.md|config\.json' || true) | wc -l) + MAIN_CHANGESETS=$(git ls-tree -r HEAD^1 .changeset | (grep -v -E 'README\.md|config\.json' || true) | wc -l) # If the PR has no changesets, but main has changesets, assume this is PR is a versioning PR and exit if [[ $PR_CHANGESETS -eq 0 && $MAIN_CHANGESETS -gt 0 ]]; then @@ -73,5 +73,5 @@ jobs: fi git switch -c changesets-temp - git checkout origin/main -- packages/definitions-parser/allowedPackageJsonDependencies.txt packages/dtslint/expectedNpmVersionFailures.txt - pnpm changeset status --since=origin/main + git checkout HEAD^1 -- packages/definitions-parser/allowedPackageJsonDependencies.txt packages/dtslint/expectedNpmVersionFailures.txt + pnpm changeset status --since=HEAD^1