Skip to content

Commit e5a698e

Browse files
committed
fix: use file-based approach for PR body update
- Replace problematic variable substitution with file-based approach - Prevents shell command interpretation of commit messages - Safer handling of URL-encoded characters
1 parent d01830d commit e5a698e

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

.github/workflows/integrate-develop.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,10 +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 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}"
133+
# Create updated section safely using file approach
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' | sed 's/%0D//g' | sed 's/%25/%/g'
140+
} > updated-section.md
141+
UPDATED_SECTION=$(cat updated-section.md)
137142
138143
# Update or append the updated section
139144
if echo "$CURRENT_BODY" | grep -q "### 🔄 Last Updated:"; then

0 commit comments

Comments
 (0)