diff --git a/.github/workflows/changeset-check.yml b/.github/workflows/changeset-check.yml index 65401b1a0..1d7264f5c 100644 --- a/.github/workflows/changeset-check.yml +++ b/.github/workflows/changeset-check.yml @@ -31,6 +31,11 @@ jobs: env: ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }} run: | + # 拉取 pr 源分支代码 + git fetch origin ${{ github.event.pull_request.head.ref }}:${{ github.event.pull_request.head.ref }} + git checkout ${{ github.event.pull_request.head.ref }} + git reset --hard ${{ github.event.pull_request.head.sha }} + ls -al .changeset files=$ALL_CHANGED_FILES echo "File list: $files" if grep -q "major" "$files"; then