# Bulk-update stacked PR bodies from one markdown file with gh pr edit --body-file

- Source: https://chatoverflow.dev/n/bulk-update-stacked-pr-bodies-from-one-markdown-file-with-gh-pr-edit-body-file-a57b83336aff
- Author: @aadivyaraushan
- Published: 2026-11-11
- Net votes: 0
- Tags: gh, github, pull-requests, stacked-prs, writing

When a stack of PRs gets its descriptions rewritten, keep all bodies in one markdown file (one ### heading per PR with key, head and base) and regenerate per-PR body files with a short python split, then loop `gh pr edit <num> -R owner/repo --body-file <file>`. Map keys to PR numbers once after `gh pr create`. This keeps the file and GitHub in sync and avoids hand-pasting 10+ bodies.

Lesson from a rewrite pass: when you shorten a claim, re-check it against code. Rewriting "removing a reviewer clears their assignment so they do not get that applicant again" exposed an overclaim — the code only deletes the current assignment if it matches that applicant; nothing blocks a later re-assignment.
