@@ -78,37 +78,31 @@ jobs:
7878 COMMIT_COUNT="${{ steps.commit-info.outputs.commit_count }}"
7979 TIMESTAMP="${{ steps.commit-info.outputs.timestamp }}"
8080
81- # Write PR body
82- cat > pr-body.md << EOF
83- # # 🚀 Integration from develop to staging
84-
85- # ## 📊 Summary
86- - **Commits**: ${COMMIT_COUNT} new commits
87- - **Created**: ${TIMESTAMP}
88- - **Auto-generated**: This PR was automatically created by the integration workflow
89-
90- # ## 📝 Recent Commits
91- EOF
92-
93- # Append commits safely
94- echo "${{ steps.commit-info.outputs.commits }}" >> pr-body.md
95-
96- # Append rest of PR body
97- cat >> pr-body.md << 'EOF'
98-
99- # ## 🔍 What happens next?
100- 1. Review the changes in this PR
101- 2. Run any necessary QA tests
102- 3. When approved and merged, the staging workflow will :
103- - Check for changesets
104- - If found, create beta releases
105- - Automatically create a PR to main
106-
107- # ## ⚡ Notes
108- - This PR will be automatically updated with new commits to develop
109- - Multiple features can accumulate in this single PR
110- - Approval triggers the beta release process
111- EOF
81+ # Create PR body file
82+ {
83+ echo "## 🚀 Integration from develop to staging"
84+ echo ""
85+ echo "### 📊 Summary"
86+ echo "- **Commits**: ${COMMIT_COUNT} new commits"
87+ echo "- **Created**: ${TIMESTAMP}"
88+ echo "- **Auto-generated**: This PR was automatically created by the integration workflow"
89+ echo ""
90+ echo "### 📝 Recent Commits"
91+ echo "${{ steps.commit-info.outputs.commits }}"
92+ echo ""
93+ echo "### 🔍 What happens next?"
94+ echo "1. Review the changes in this PR"
95+ echo "2. Run any necessary QA tests"
96+ echo "3. When approved and merged, the staging workflow will:"
97+ echo " - Check for changesets"
98+ echo " - If found, create beta releases"
99+ echo " - Automatically create a PR to main"
100+ echo ""
101+ echo "### ⚡ Notes"
102+ echo "- This PR will be automatically updated with new commits to develop"
103+ echo "- Multiple features can accumulate in this single PR"
104+ echo "- Approval triggers the beta release process"
105+ } > pr-body.md
112106
113107 gh pr create \
114108 --base staging \
@@ -136,26 +130,16 @@ EOF
136130 CURRENT_BODY=$(gh pr view $PR_NUMBER --json body --jq '.body')
137131
138132 # Create updated section
139- UPDATED_SECTION="### 🔄 Last Updated: ${TIMESTAMP}
140- **New commits**: ${COMMIT_COUNT}
141-
142- # ## 📝 Recent Commits
143- $COMMITS"
133+ UPDATED_SECTION="### 🔄 Last Updated: ${TIMESTAMP}\nNew commits: ${COMMIT_COUNT}\n\n### 📝 Recent Commits\n${COMMITS}"
144134
145135 # Update or append the updated section
146136 if echo "$CURRENT_BODY" | grep -q "### 🔄 Last Updated:"; then
147137 # Replace existing update section
148138 NEW_BODY=$(echo "$CURRENT_BODY" | sed '/### 🔄 Last Updated:/,/### 📝 Recent Commits/d' | sed '/^$/d')
149- NEW_BODY="$NEW_BODY
150-
151- $UPDATED_SECTION"
139+ NEW_BODY="$NEW_BODY\n\n$UPDATED_SECTION"
152140 else
153141 # Append update section
154- NEW_BODY="$CURRENT_BODY
155-
156- ---
157-
158- $UPDATED_SECTION"
142+ NEW_BODY="$CURRENT_BODY\n\n---\n\n$UPDATED_SECTION"
159143 fi
160144
161145 # Update PR body
0 commit comments