modularml / stack-pr

A tool for working with stacked PRs on github.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature request: support customized branch names for created PRs

PeimingLiu opened this issue · comments

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.

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? :)

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?

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>>.