File tree Expand file tree Collapse file tree 1 file changed +9
-18
lines changed Expand file tree Collapse file tree 1 file changed +9
-18
lines changed Original file line number Diff line number Diff line change @@ -130,24 +130,15 @@ jobs:
130130 # Get current PR body
131131 CURRENT_BODY=$(gh pr view $PR_NUMBER --json body --jq '.body')
132132
133- # Create updated section with escaped content
134- cat > updated-section.md << 'EOF'
135- # ## π Last Updated: TIMESTAMP_PLACEHOLDER
136- New commits : COUNT_PLACEHOLDER
137-
138- # ## π Recent Commits
139- COMMITS_PLACEHOLDER
140- EOF
141-
142- # Replace placeholders safely
143- sed -i "s/TIMESTAMP_PLACEHOLDER/${TIMESTAMP}/g" updated-section.md
144- sed -i "s/COUNT_PLACEHOLDER/${COMMIT_COUNT}/g" updated-section.md
145-
146- # Process commits separately and safely
147- echo "${COMMITS}" | sed 's/%0A/\n/g' | sed 's/%0D//g' | sed 's/%25/%/g' > commits-temp.txt
148- sed -i '/COMMITS_PLACEHOLDER/r commits-temp.txt' updated-section.md
149- sed -i '/COMMITS_PLACEHOLDER/d' updated-section.md
150-
133+ # Create updated section safely using echo commands
134+ {
135+ echo "### π Last Updated: ${TIMESTAMP}"
136+ echo "New commits: ${COMMIT_COUNT}"
137+ echo ""
138+ echo "### π Recent Commits"
139+ echo "${COMMITS}" | sed 's/%0A/\n/g; s/%0D//g; s/%25/%/g'
140+ } > updated-section.md
141+
151142 UPDATED_SECTION=$(cat updated-section.md)
152143
153144 # Update or append the updated section
You canβt perform that action at this time.
0 commit comments