You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Create PR with a special tag in the body to identify it later
142
142
gh pr create --base next --head next-port-pr${{ github.event.pull_request.number }} \
143
143
--title "[Port to next] ${{ github.event.pull_request.title }}" \
144
-
--body "Automatic port of PR #${{ github.event.pull_request.number }} to next branch.\n\nOriginal PR: #${{ github.event.pull_request.number }}\nCreated automatically after adding the 'temp - port to docs-next' label."
144
+
--body "Automatic port of PR #${{ github.event.pull_request.number }} to next branch.\n\nOriginal PR: #${{ github.event.pull_request.number }}\nCreated automatically after adding the 'temp - port to docs-next' label.\n\n<!-- SYNC_PR_MARKER -->"
echo "Updating existing PR #$EXISTING_PR with latest merged changes"
252
+
253
+
# Add comment explaining the update
254
+
gh pr comment $EXISTING_PR --body "This PR has been updated with the latest changes from the merged PR #${{ github.event.pull_request.number }}. The merge commit was cherry-picked to include all approved changes."
NEW_PR=$(gh pr create --base next --head $BRANCH_NAME \
267
+
--title "[Merged-sync] $PR_TITLE" \
268
+
--body "Synchronization of merged PR #${{ github.event.pull_request.number }} to next branch. This PR contains the final state of the changes as they were merged to main." \
269
+
--json number --jq '.number')
270
+
271
+
# Now close the existing PR with a reference to the new one
272
+
gh pr close $EXISTING_PR --comment "This PR is replaced by the direct synchronization of the merge commit in #$NEW_PR"
--body "Synchronization of merged PR #${{ github.event.pull_request.number }} to next branch. This PR contains the final state of the changes as they were merged to main."
0 commit comments