Skip to content

Commit 1572e47

Browse files
committed
fix(workflow): prevent shell interpretation in JSON heredoc
- Change unquoted heredoc delimiter from `<<EOF` to `<<"EOF"` in PR parsing step - Prevents shell from interpreting special characters (like `->`) in JSON comment bodies as shell commands - Fixes workflow failures when PR comments contain shell metacharacters Resolves issue where workflow would exit unexpectedly and execute unintended bash commands when processing PR comments containing characters like `->`.
1 parent 6f6ba2c commit 1572e47

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/index.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ jobs:
9999
- name: Parse pull request using jq and checking mergeable state
100100
id: mergeable_pr
101101
run: |
102-
cat <<EOF > pr.js
102+
cat <<"EOF" > pr.js
103103
${{ steps.get_pull_request_info.outputs.data }}
104104
EOF
105105
export IS_MERGEABLE_PR=$(jq -r '.mergeable' pr.js)

0 commit comments

Comments
 (0)