File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 1313 # ---------------------------------------------------------
1414 # SAFETY CHECK:
1515 # Only run for PRs from the SAME repository.
16- # Fork PRs are skipped entirely to prevent RCE via npm install.
16+ # Fork PRs are skipped entirely to prevent RCE via pnpm install.
1717 # ---------------------------------------------------------
1818 if : ${{ github.event.pull_request.head.repo.fork == false }}
1919 permissions :
@@ -30,15 +30,19 @@ jobs:
3030 uses : actions/setup-node@v4
3131 with :
3232 node-version : 18
33+ - name : Install pnpm
34+ uses : pnpm/action-setup@v4
35+ with :
36+ version : 10.25.0
3337 - name : Install Dependencies
34- run : npm install
38+ run : pnpm install
3539 - name : Run prettier
3640 run : |
3741 git config --global core.quotepath off
3842 changed_files=$(git diff --name-only "${{ github.event.pull_request.base.sha }}" | grep -E '\.js$|\.ts$|\.php$|\.sql$|\.md$' || true)
3943 if [ -n "$changed_files" ]; then
4044 echo "Running prettier on the changed files"
41- echo "$changed_files" | xargs -d '\n' npx prettier --write
45+ echo "$changed_files" | xargs -d '\n' pnpm exec prettier --write
4246 else
4347 echo "No matching files to run prettier on."
4448 fi
You can’t perform that action at this time.
0 commit comments