File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 58
58
# Opened/reopened/updated PR: include PR author + title
59
59
- name : " Construct JSON (for PR sync)"
60
60
if : github.event_name == 'pull_request' && github.event.action != 'closed'
61
+ # Escape double quotes in PR title, as it will be used in a JSON string.
61
62
run : |
63
+ escapedPrTitle=$(echo "${{ github.event.pull_request.title }}" | sed 's/"/\\"/g')
62
64
payload=$(cat <<'HEREDOC'
63
65
{
64
66
"op": "put",
68
70
"commit-sha": "${{ github.event.pull_request.head.sha }}",
69
71
"date": "${{ github.event.pull_request.updated_at }}",
70
72
"pr-author": "${{ github.event.pull_request.user.login }}",
71
- "pr-title": "${{ github.event.pull_request.title }} "
73
+ "pr-title": "$escapedPrTitle "
72
74
}
73
75
HEREDOC)
74
76
echo "VAR=$payload"
You can’t perform that action at this time.
0 commit comments