Skip to content

Commit 5aa7dd0

Browse files
authored
Revert back to use GitHub context (#42066)
* check * fix --------- Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
1 parent 5c1df12 commit 5aa7dd0

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

.github/workflows/pr_slow_ci_suggestion.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,15 @@ jobs:
2828
with:
2929
fetch-depth: "0"
3030

31+
# We need to use `${{ ... }}` here to avoid `Argument list too long` error when a PR changes a lot of files.
32+
# (We could also try to use artifact approach, but it's more involved).
33+
# `CodeQL` doesn't identify any security issue here. Also `PR_FILES` is from `get-pr-info.yml` by using an api
34+
# `github.rest.pulls.listFiles`, which is fine.
3135
- name: Write pr_files file
32-
uses: actions/github-script@v7
33-
with:
34-
script: |
35-
const fs = require('node:fs');
36-
const prFilesJson = `${{ needs.get-pr-info.outputs.PR_FILES }}`;
37-
fs.writeFileSync('pr_files.txt', prFilesJson);
36+
run: |
37+
cat > pr_files.txt << 'EOF'
38+
${{ needs.get-pr-info.outputs.PR_FILES }}
39+
EOF
3840
3941
- name: Get repository content
4042
id: repo_content

0 commit comments

Comments
 (0)