Skip to content

Commit d01830d

Browse files
committed
fix: decode URL-encoded characters in PR body update
- Fix shell execution error caused by %0A in commit messages - Properly decode %0A, %0D, %25 back to readable format - Prevents 'command not found' errors in workflow
1 parent dfca2a9 commit d01830d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/integrate-develop.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,10 @@ jobs:
130130
# Get current PR body
131131
CURRENT_BODY=$(gh pr view $PR_NUMBER --json body --jq '.body')
132132
133-
# Create updated section
134-
UPDATED_SECTION="### 🔄 Last Updated: ${TIMESTAMP}\nNew commits: ${COMMIT_COUNT}\n\n### 📝 Recent Commits\n${COMMITS}"
133+
# Create updated section with proper escaping
134+
# Decode %0A back to actual newlines for proper display
135+
DECODED_COMMITS=$(echo "${COMMITS}" | sed 's/%0A/\n/g' | sed 's/%0D//g' | sed 's/%25/%/g')
136+
UPDATED_SECTION="### 🔄 Last Updated: ${TIMESTAMP}\nNew commits: ${COMMIT_COUNT}\n\n### 📝 Recent Commits\n${DECODED_COMMITS}"
135137
136138
# Update or append the updated section
137139
if echo "$CURRENT_BODY" | grep -q "### 🔄 Last Updated:"; then

0 commit comments

Comments
 (0)