Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 9 additions & 18 deletions .github/workflows/integrate-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,24 +130,15 @@ jobs:
# Get current PR body
CURRENT_BODY=$(gh pr view $PR_NUMBER --json body --jq '.body')

# Create updated section with escaped content
cat > updated-section.md << 'EOF'
### πŸ”„ Last Updated: TIMESTAMP_PLACEHOLDER
New commits: COUNT_PLACEHOLDER

### πŸ“ Recent Commits
COMMITS_PLACEHOLDER
EOF

# Replace placeholders safely
sed -i "s/TIMESTAMP_PLACEHOLDER/${TIMESTAMP}/g" updated-section.md
sed -i "s/COUNT_PLACEHOLDER/${COMMIT_COUNT}/g" updated-section.md

# Process commits separately and safely
echo "${COMMITS}" | sed 's/%0A/\n/g' | sed 's/%0D//g' | sed 's/%25/%/g' > commits-temp.txt
sed -i '/COMMITS_PLACEHOLDER/r commits-temp.txt' updated-section.md
sed -i '/COMMITS_PLACEHOLDER/d' updated-section.md

# Create updated section safely using echo commands
{
echo "### πŸ”„ Last Updated: ${TIMESTAMP}"
echo "New commits: ${COMMIT_COUNT}"
echo ""
echo "### πŸ“ Recent Commits"
echo "${COMMITS}" | sed 's/%0A/\n/g; s/%0D//g; s/%25/%/g'
} > updated-section.md

UPDATED_SECTION=$(cat updated-section.md)

# Update or append the updated section
Expand Down