File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -206,8 +206,10 @@ create_pr() {
206206 upstream_desc=" commit $( git rev-parse --short " $UPSTREAM_COMMIT " ) (from ${UPSTREAM_REMOTE} /${UPSTREAM_BRANCH} )"
207207 fi
208208 title=" chore: sync ${upstream_desc} into ${BASE_BRANCH} "
209- body=$(
210- cat << EOF
209+ local body_file
210+ body_file=$( mktemp)
211+ trap " rm -f '$body_file '" EXIT
212+ cat << EOF >"$body_file "
211213## Summary
212214- Merge upstream \` ${upstream_desc} \` into \` ${BASE_BRANCH} \`
213215- Preserve upstream commit history for incremental future syncs
@@ -217,14 +219,13 @@ create_pr() {
217219- This PR can be merged into \` ${BASE_BRANCH} \` without conflicts (conflicts were resolved during the upstream merge)
218220- Use **merge commit** (not squash) to preserve upstream commit granularity
219221EOF
220- )
221222
222223 if gh pr view " $SYNC_BRANCH " > /dev/null 2>&1 ; then
223224 echo " PR for branch $SYNC_BRANCH already exists, skipping creation."
224225 return
225226 fi
226227
227- gh pr create --base " $BASE_BRANCH " --head " $SYNC_BRANCH " --title " $title " --body " $body "
228+ gh pr create --base " $BASE_BRANCH " --head " $SYNC_BRANCH " --title " $title " --body-file " $body_file "
228229}
229230
230231# ── Main ──────────────────────────────────────────────────────────────
You can’t perform that action at this time.
0 commit comments