@@ -77,46 +77,16 @@ jobs:
77
77
env :
78
78
GH_TOKEN :${{ secrets.GITHUB_TOKEN }}
79
79
80
- -name :Create syncPR
81
- id :create- sync-pr
80
+ -name :Provide syncinstructions
81
+ id :sync-instructions
82
82
if :steps.branch-status.outputs.needs-sync == 'true' && steps.existing-pr.outputs.has-existing-pr == 'false'
83
83
run :|
84
84
BEHIND_COUNT="${{ steps.branch-status.outputs.behind-count }}"
85
85
AHEAD_COUNT="${{ steps.branch-status.outputs.ahead-count }}"
86
86
87
- # Create PR from main to next
88
- PR_URL=$(gh pr create \
89
- --base next \
90
- --head main \
91
- --title "Sync next branch with main" \
92
- --body "## 🔄 Automated Branch Sync
93
-
94
- This PR syncs the \`next\` branch with the latest changes from \`main\`.
95
-
96
- ### Status:
97
- - **Behind main**: ${BEHIND_COUNT} commits
98
- - **Ahead of main**: ${AHEAD_COUNT} commits
99
-
100
- ### What to do:
101
- 1. 🔍 Review the changes in this PR
102
- 2. ✅ Ensure all checks pass
103
- 3. 🔀 Merge this PR to sync the \`next\` branch
104
- 4. 🗑️ The \`next\` branch will then be ready for new development
105
-
106
- > **Note**: This PR was automatically created by the daily branch sync workflow.
107
- > If you have any concerns about these changes, please review them carefully before merging." \
108
- --label "automated" \
109
- --label "sync")
110
-
111
- # Extract PR number from URL (e.g., https://github.com/owner/repo/pull/123 -> 123)
112
- PR_NUMBER=$(echo "$PR_URL" | sed 's|.*/pull/||')
113
-
114
- echo "pr-number=${PR_NUMBER}" >> $GITHUB_OUTPUT
115
- echo "pr-url=${PR_URL}" >> $GITHUB_OUTPUT
116
-
117
- echo "✅ Created sync PR #${PR_NUMBER}: ${PR_URL}"
118
- env :
119
- GH_TOKEN :${{ secrets.GITHUB_TOKEN }}
87
+ echo "action-needed=true" >> $GITHUB_OUTPUT
88
+ echo "🔄 Next branch needs syncing (${BEHIND_COUNT} commits behind main)"
89
+ echo "� Manual PR creation required due to organization policies"
120
90
121
91
-name :Job Summary
122
92
if :always()
126
96
NEEDS_SYNC="${{ steps.branch-status.outputs.needs-sync }}"
127
97
HAS_EXISTING_PR="${{ steps.existing-pr.outputs.has-existing-pr }}"
128
98
EXISTING_PR="${{ steps.existing-pr.outputs.existing-pr }}"
129
- NEW_PR_URL="${{ steps.create-sync-pr.outputs.pr-url }}"
130
- NEW_PR_NUMBER="${{ steps.create-sync-pr.outputs.pr-number }}"
99
+ ACTION_NEEDED="${{ steps.sync-instructions.outputs.action-needed }}"
131
100
132
101
cat << EOF >> $GITHUB_STEP_SUMMARY
133
102
# 🔄 Branch Sync Status
@@ -146,15 +115,36 @@ jobs:
146
115
147
116
Please review and merge the existing PR to sync the next branch.
148
117
EOF
149
- elif [-n "$NEW_PR_NUMBER " ]; then
118
+ elif ["$ACTION_NEEDED" = "true " ]; then
150
119
cat << EOF >> $GITHUB_STEP_SUMMARY
151
- ## ✅ Action Taken:
152
- Created a new sync PR: [#${NEW_PR_NUMBER}](${NEW_PR_URL})
120
+ ## 📝 Manual Action Required:
121
+
122
+ The \`next\` branch is ${BEHIND_COUNT} commits behind \`main\` and needs to be synced.
123
+
124
+ **Please create a pull request manually:**
125
+
126
+ 1. 🌐 [Create PR: main → next](https://github.com/${{ github.repository }}/compare/next...main)
127
+ 2. 📝 Use title: **"Sync next branch with main"**
128
+ 3. 📄 Use this description:
129
+
130
+ \`\`\`markdown
131
+ ## 🔄 Branch Sync
132
+
133
+ This PR syncs the \`next\` branch with the latest changes from \`main\`.
134
+
135
+ ### Status:
136
+ - **Behind main**: ${BEHIND_COUNT} commits
137
+ - **Ahead of main**: ${AHEAD_COUNT} commits
138
+
139
+ ### What to do:
140
+ 1. 🔍 Review the changes in this PR
141
+ 2. ✅ Ensure all checks pass
142
+ 3. 🔀 Merge this PR to sync the \`next\` branch
143
+ 4. 🗑️ The \`next\` branch will then be ready for new development
144
+ \`\`\`
153
145
154
- **Next steps:**
155
- 1. Review the changes in the PR
156
- 2. Ensure all checks pass
157
- 3. Merge the PR to sync the next branch
146
+ 4. 🏷️ Add labels: \`automated\`, \`sync\`
147
+ 5. ✅ Review and merge when ready
158
148
EOF
159
149
fi
160
150
else