Replies: 2 comments
|
Use both flags together: gh pr create --fill-verbose --editor
To avoid typing gh config set prefer_editor_prompt enabled
gh pr create --fill-verbosePlain Checked current |
|
There is not a built-in flag today that means “open the editor and include full commit bodies” — Practical workaround (interactive + bodies)Create the PR body in a temp file, then pass it to # Write verbose fill to a file without creating the PR yet
gh pr create --fill-verbose --draft --title "WIP"
# If --draft still publishes too early for you, build the body manually:
git log --format=%B main..HEAD > /tmp/pr-body.txt
${EDITOR:-vi} /tmp/pr-body.txt
gh pr create --body-file /tmp/pr-body.txtOn Windows PowerShell: git log --format=%B origin/main..HEAD | Out-File -Encoding utf8 pr-body.txt
notepad pr-body.txt
gh pr create --body-file pr-body.txtEditor-first flow (what I use daily)gh pr createThen in the editor:
One-liner to append commit messages + bodies into your clipboard before opening the editor: git log --format=%B main..HEADFeature request angleA nice CLI enhancement would be something like: gh pr create --fill-verbose --editor…which would populate the template + verbose commits, then open For now, |
Uh oh!
There was an error while loading. Please reload this page.
If I run
gh pr createit will interactively create a PR and drop me into my editor of choice with the PR description template of the repo injected into the editor. The cli will also input a list of the commit messages in the PR description for me to edit, but none of the commit message bodies. Is there any way to get the CLI to inject the commit bodies into the editor? If I rungh pr create --fill-verbosethen it injects the commit bodies into the PR description but creates the PR immediately. I can't see a way to use this flag with interactive creation of the PR.All reactions