File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -14,18 +14,19 @@ jobs:
1414 - name : Extract Release Notes
1515 id : extract
1616 run : |
17- BODY="${{ github.event.pull_request.body }}"
17+ # Save PR body to file
18+ echo "${{ github.event.pull_request.body }}" > pr_body.md
1819
1920 # Extract everything from "# Releases" onward
20- RELEASE_NOTES=$(echo "$BODY" | awk '/^# Releases/{flag =1} flag')
21-
22- # Sanitize: escape backticks (which break Telegram markdown code blocks)
23- RELEASE_NOTES="${RELEASE_NOTES//\ `/\\\`}"
24-
25- # Write to environment variable safely
21+ awk '/^# Releases/ {found =1} found' pr_body.md > release_notes.txt
22+
23+ # Escape backticks to keep Telegram Markdown happy
24+ sed 's/ `/\\`/g' release_notes.txt > sanitized_notes.txt
25+
26+ # Store in env variable
2627 {
2728 echo "RELEASE_NOTES<<EOF"
28- echo "$RELEASE_NOTES"
29+ cat sanitized_notes.txt
2930 echo "EOF"
3031 } >> "$GITHUB_ENV"
3132
You can’t perform that action at this time.
0 commit comments