diff --git a/.github/workflows/changeset-check.yml b/.github/workflows/changeset-check.yml index 1d7264f5c..a6bc1c96e 100644 --- a/.github/workflows/changeset-check.yml +++ b/.github/workflows/changeset-check.yml @@ -30,11 +30,10 @@ jobs: id: check_changeset env: ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }} + GH_TOKEN: ${{ github.token }} 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 }} + gh pr checkout ${{ github.event.pull_request.number }} ls -al .changeset files=$ALL_CHANGED_FILES echo "File list: $files"