modularml / stack-pr

A tool for working with stacked PRs on github.
Other
299 stars 11 forks source link

PR template support #47

Open prakashbalaji opened 1 month ago

prakashbalaji commented 1 month ago

Hi,

Nice tool and helps a lot speed up developer workflow, thanks for making it available. Most of our repos have a PR template, do we have support for it already? Like honouring the template but adding the useful information about the stack at the bottom of the template.

-Prakash

ZolotukhinM commented 3 weeks ago

Thanks for the kind words! For templates the thing is that here we're using commit message as the future content for created PRs. You could configure your git repo to use a template for commit messages and thus your PRs would comply with the expected template on the github. Would that be something that you could use instead? While it would be neat to be able to query the template directly from GitHub, I feel that interactions with everything else could get hairy, and additionally I don't think there is a programmatic way to query such templates from GH repos.

prakashbalaji commented 2 weeks ago

Thanks @ZolotukhinM for the suggestion and it works well with a commit template. Not sure if there could be a way to add a placeholder markdown in the template to suggest where the stack-pr comment should be added so that it gives users some control over where to place the stack like at the top vs at the bottom of the template.

Screenshot 2024-11-06 at 9 07 09 AM
ZolotukhinM commented 1 week ago

That would complicate some other existing features (e.g. --keep-body which needs to update only the stack-pr comment, but not the actual description). It feels like this is not a critical thing to have and in some sense is a matter of taste, so I'd prefer to not add it at the potential expense of introducing problems into other features.