@@ -77,46 +77,16 @@ jobs:
7777 env :
7878 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
7979
80- - name : Create sync PR
81- id : create- sync-pr
80+ - name : Provide sync instructions
81+ id : sync-instructions
8282 if : steps.branch-status.outputs.needs-sync == 'true' && steps.existing-pr.outputs.has-existing-pr == 'false'
8383 run : |
8484 BEHIND_COUNT="${{ steps.branch-status.outputs.behind-count }}"
8585 AHEAD_COUNT="${{ steps.branch-status.outputs.ahead-count }}"
8686
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"
12090
12191 - name : Job Summary
12292 if : always()
12696 NEEDS_SYNC="${{ steps.branch-status.outputs.needs-sync }}"
12797 HAS_EXISTING_PR="${{ steps.existing-pr.outputs.has-existing-pr }}"
12898 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 }}"
131100
132101 cat << EOF >> $GITHUB_STEP_SUMMARY
133102 # π Branch Sync Status
@@ -146,15 +115,36 @@ jobs:
146115
147116 Please review and merge the existing PR to sync the next branch.
148117 EOF
149- elif [ -n "$NEW_PR_NUMBER " ]; then
118+ elif [ "$ACTION_NEEDED" = "true " ]; then
150119 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+ \`\`\`
153145
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
158148 EOF
159149 fi
160150 else
0 commit comments