submit --auto fills every new PR with the raw template, with no way to supply a body #410
mark-bookedworks
started this conversation in
Feedback
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
What happens
gh stack submit --autocopies.github/pull_request_template.mdinto every new PR verbatim, and there is no flag to supply a body instead. Every PR in the stack lands with the template's<!-- ... -->placeholders intact and its checklist unchecked.Repro on a repo that has a PR template:
We hit this on a 3-layer stack. All three PRs opened with unchecked
- [ ] All tests passing locallyboxes sitting directly above fully green CI, which reads to a reviewer as though nothing had been verified. The rationale we had written into each commit body was discarded.Why
--autoisn't optional for usThe interactive TUI added in #147 solves this nicely for humans: you edit each description before submitting. But
--autoskips the editor, and it is mandatory for any non-interactive caller. GitHub's own agent skill for this extension states the rule plainly:So agents and CI must pass
--auto, and--autois exactly the path with no way to provide a body. The result is that agent-created stacked PRs land with unfilled scaffolding by default rather than by oversight.There is also a smaller inconsistency inside
--autoitself. Titles fall back intelligently (commit subject for a single commit, humanized branch name otherwise), but bodies do not fall back at all: the template wins even when a perfectly good commit body exists.Not a duplicate, but related
submit. That was delivered in use PR template when opening PRs #77 and expanded in Add an interactive submit TUI for customizing each PR's title, description, and draft state #147. This report is about the interaction between that feature and--auto, which pull requests created with `gh stack submit` do not use the pull request readme template #53 predates.gh stack linkfrom a Sapling workflow. Overlapping motivation, different command and different cause.What would fix it
In rough order of preference:
submit, per branch. Something like--body-file <branch>=<path>(repeatable), or simply honouring--body-filefor a single-layer submit. This is the general fix and covers agents, CI, and scripted use.--autofall back to the commit body the way it already falls back for titles: single commit on the branch means commit subject as title and commit body as description, with the template used only when the commit has no body. This matches whatgit push-created PRs do and would have fully solved our case.--auto. An empty body is more honest than a template that looks filled in but is not, and it is far easier to detect afterwards.Happy to test a prerelease against a real stack if that is useful.
Environment
gh2.93.0,gh-stackv0.1.0, Linux.github/pull_request_template.mdwith 6 comment placeholdersAll reactions