File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -16,15 +16,18 @@ jobs:
1616 run : |
1717 BODY="${{ github.event.pull_request.body }}"
1818
19- # Extract from "# Releases" onward
19+ # Extract everything from "# Releases" onward
2020 RELEASE_NOTES=$(echo "$BODY" | awk '/^# Releases/{flag=1} flag')
21-
22- # Escape backticks to prevent breaking Telegram message
21+
22+ # Sanitize: escape backticks (which break Telegram markdown code blocks)
2323 RELEASE_NOTES="${RELEASE_NOTES//\`/\\\`}"
24-
25- echo "RELEASE_NOTES<<EOF" >> $GITHUB_ENV
26- echo "$RELEASE_NOTES" >> $GITHUB_ENV
27- echo "EOF" >> $GITHUB_ENV
24+
25+ # Write to environment variable safely
26+ {
27+ echo "RELEASE_NOTES<<EOF"
28+ echo "$RELEASE_NOTES"
29+ echo "EOF"
30+ } >> "$GITHUB_ENV"
2831
2932 - name : Send Telegram Message
3033 uses : appleboy/telegram-action@master
You can’t perform that action at this time.
0 commit comments