modularml / stack-pr

A tool for working with stacked PRs on github.
Other
291 stars 10 forks source link

Feature request: support customized branch names for created PRs #18

Closed PeimingLiu closed 1 month ago

PeimingLiu commented 2 months ago

Hi,

Seems that stack-pr hardcoded to use "f{username}/stack/{id}" for the branch name, but some repos have restriction on the branch name (e.g., LLVM). I tried to use the tool but could only get it work by modifying the code myself.

ZolotukhinM commented 2 months ago

That sounds like a reasonable feature to have - given that you've already made the changes, would you be able to send a pull request to add this? :)

PeimingLiu commented 2 months ago

Guess what, I just hardcoded a different prefix to fit my need too :).

With that being said, I also don't think simply requiring a --prefix argument to override the default behavior is ideal either. Maybe it would be better to support a per-project configuration?

ZolotukhinM commented 2 months ago

Yeah, we can have something like a branch-name template. E.g. by default it would be <<USERNAME>>/stack/<<ID>> (syntax is arbitrary), but then it can be configured to be something else, e.g. users/<<USERNAME>>/stack/<<ID>>.