diff --git a/lib/sync.sh b/lib/sync.sh index 03afe6b..c46bb5f 100644 --- a/lib/sync.sh +++ b/lib/sync.sh @@ -122,7 +122,14 @@ ${BOT_TRAILER}: forward/${mono_branch}/$(date -u +%Y-%m-%dT%H:%M:%SZ)" >&2 local pr_body conflicted_list # shellcheck disable=SC2001 conflicted_list=$(echo "$conflicted" | sed 's/^/- /') - pr_body="## Sync Conflict\n\nMonorepo \`${mono_branch}\` has changes that conflict with \`${subrepo_branch}\`.\n\n**Conflicted files:**\n${conflicted_list}\n\nPlease resolve and merge this PR to complete the sync." + pr_body="## Sync Conflict + +Monorepo \`${mono_branch}\` has changes that conflict with \`${subrepo_branch}\`. + +**Conflicted files:** +${conflicted_list} + +Please resolve and merge this PR to complete the sync." create_pr "${SUBREPO_API}" "${SUBREPO_TOKEN}" \ "$subrepo_branch" "$conflict_branch" \ @@ -281,7 +288,18 @@ reverse_sync() { # 5. Create PR on monorepo (NEVER direct push) local pr_body - pr_body="## Subrepo changes\n\nNew commits from subrepo \`${subrepo_branch}\`:\n\n\`\`\`\n${human_commits}\n\`\`\`\n\n**Review checklist:**\n- [ ] Changes scoped to synced subfolder\n- [ ] No leaked credentials or environment-specific config\n- [ ] CI passes" + pr_body="## Subrepo changes + +New commits from subrepo \`${subrepo_branch}\`: + +\`\`\` +${human_commits} +\`\`\` + +**Review checklist:** +- [ ] Changes scoped to synced subfolder +- [ ] No leaked credentials or environment-specific config +- [ ] CI passes" create_pr "${MONOREPO_API}" "${GITEA_TOKEN}" \ "$mono_branch" "$staging_branch" \ @@ -369,7 +387,14 @@ ${BOT_TRAILER}: import/${JOSH_SYNC_TARGET_NAME}/${ts}" >&2 # 5. Create PR on monorepo local pr_body - pr_body="## Initial import\n\nImporting existing subrepo \`${subrepo_branch}\` (${file_count} files) into \`${subfolder}/\`.\n\n**Review checklist:**\n- [ ] Content looks correct\n- [ ] No leaked credentials or environment-specific config\n- [ ] CI passes" + pr_body="## Initial import + +Importing existing subrepo \`${subrepo_branch}\` (${file_count} files) into \`${subfolder}/\`. + +**Review checklist:** +- [ ] Content looks correct +- [ ] No leaked credentials or environment-specific config +- [ ] CI passes" create_pr "${MONOREPO_API}" "${GITEA_TOKEN}" \ "$mono_branch" "$staging_branch" \